Hi, I’m trying to build two artifacts:
- regular jar my-module-name.jar with pom where all dependecines are listed
- fat jar using shadowPlugin. Fat jar has differnet classifier: ‘all’. fatJat should have EMPTY pom since it has all required stuff onboard.
Here is my code:
shadowJar {
zip64 true
classifier = 'all'
relocate 'com.fasterxml', 'shadow.com.fasterxml'
relocate 'org.joda', 'shadow.org.joda'
relocate 'com.sun.jersey', 'shadow.com.sun.jersey'
configurations = [project.configurations.distrib]
}
publication {
artifact distTargz
artifact jar
}
artifacts {
distTargzConfig distTargz
archives shadowJar
archives jar
}
publication 'shadow', {
artifact shadowJar
}
I get two jars published:
- my-module-name.jar
-my-module-name-all.jar
I get only single pom without ANY dependencies and this pom describes my-module-name.jar
What do I do wrong?