Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
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
Shadded META-INF/axiom.xml relocated contents.
Shadded META-INF/axiom.xml renamed/moved for avoid conflict.
Shadded java class ImplementationFactory with content modified to show renamed/moved META-INF/axiom.xml.
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 him to "test.shadow.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactoryLoader".
2 - Two META-INF/axiom.xml files are in conflict (shadded and non-shadded).
File is accessed in this way:
Class "org.apache.axiom.locator.ImplementationFactory" (axiom-impl) offers the file :
static final String **DESCRIPTOR_RESOURCE** = "**META-INF/axiom.xml**";
and org.apache.axiom.locator.DefaultOMMetaFactoryLocator (axiom-api) uses de file :
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 him to "test.shadow.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactoryLoader".
2 - Two META-INF/axiom.xml files are in conflict (shadded and non-shadded). File is accessed in this way: Class "org.apache.axiom.locator.ImplementationFactory" (axiom-impl) offers the file :
and org.apache.axiom.locator.DefaultOMMetaFactoryLocator (axiom-api) uses de file :
I need to rename (META-INF/axiom-shadow.xml) or move (META-INF/shadow/axiom.xml) the shadded file, in order to avoid conflict.
3 - I need the class "org.apache.axiom.locator.ImplementationFactory" to be modified to offer the shadded file (renamed or moved).
Is it possible to do this with the Shadow plugin?
Many thanks.
Gradle Build Script(s)
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)