You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shadded META-INF/axiom.xml relocated contents (xmlns for conflict avoiding).
Shadded java class ImplementationFactory with content modified for use shadded META-INF/axiom.xml relocated xmlns value.
Actual Behavior
Due to version conflict, I need to shade/relocate axiom-api and axiom-impl jars.
Using com.github.johnrengelman.shadow (v6.1.0), with the following build.gradle :
I need to relocate his loader to "eu.shadow.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactoryLoader".
2 - Two META-INF/axiom.xml files are in conflict (shadded and non-shadded). This files offers a resource with the same qualified name (see below). I need to "relocate" xmlns to "http://ws.apache.shadow.eu/axiom/" for conflict avoiding.
3 - For resource use, class "org.apache.axiom.locator.ImplementationFactory" (axiom-impl) defines : private static final String NS = "http://ws.apache.org/axiom/";
I need that shadded "eu.shadow.apache.axiom.locator.ImplementationFactory" "relocates" this value to : private static final String NS = "http://ws.apache.shadow.eu/axiom/
in order to reach the desired relocated resource.
Is it possible to do this with the Shadow plugin?
Many thanks.
NOTE : I made all these modifications by hand, with text and hexa editors, directly on the output shadow jar, and it works. I modified axiom.xml and ImplementationFactory.class files.
Please check the User Guide before submitting "how do I do 'x'?" questions!
Shadow Version
6.1.0
Gradle Version
7.5.1
Expected Behavior
Actual Behavior
Due to version conflict, I need to shade/relocate axiom-api and axiom-impl jars.
Using com.github.johnrengelman.shadow (v6.1.0), with the following build.gradle :
the classes have been relocated correctly, but 3 problems remain:
1 - META-INF/axiom.xml (from axiom-impl) contents have not been replaced :
I need to relocate his loader to "eu.shadow.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactoryLoader".
2 - Two META-INF/axiom.xml files are in conflict (shadded and non-shadded). This files offers a resource with the same qualified name (see below). I need to "relocate" xmlns to "http://ws.apache.shadow.eu/axiom/" for conflict avoiding.
3 - For resource use, class "org.apache.axiom.locator.ImplementationFactory" (axiom-impl) defines :
private static final String NS = "http://ws.apache.org/axiom/";
I need that shadded "eu.shadow.apache.axiom.locator.ImplementationFactory" "relocates" this value to :
private static final String NS = "http://ws.apache.shadow.eu/axiom/
in order to reach the desired relocated resource.
Is it possible to do this with the Shadow plugin?
Many thanks.
NOTE : I made all these modifications by hand, with text and hexa editors, directly on the output shadow jar, and it works. I modified axiom.xml and ImplementationFactory.class files.
Gradle Build Script(s)
GIST : https://gist.github.com/mosaikdoc/5c4a293ea0d6b939e3d165aff1dd8e4e
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)The text was updated successfully, but these errors were encountered: