Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
I am using the shadow jar and the release plugin. Basically it is a jar task and makes the fat jar.
An obscure bug happens only when my repo is clean, release strategy final/dev: The publication task that uploads the jar gets confused about the name and tries adding a classifier string -all at the end:
Invalid publication 'shadow': artifact file does not exist: '/home/sid/workspace/sandbox/build/libs/test-project-0.1.0-all.jar'
But the actual classifier is null and the real file is test-project-0.1.0.jar
This does not happen when release plugin is removed and also does not happen if the repo is dirty. The default versionStrategy is a custom one that increments the minor scope of the plugin.
So what is it about the dirty repo that might effect the shadow plugin?
I would be happy to upload a test project for you to play with, if you have the bandwidth.
I am using the shadow jar and the release plugin. Basically it is a jar task and makes the fat jar.
An obscure bug happens only when my repo is clean, release strategy final/dev: The publication task that uploads the jar gets confused about the name and tries adding a classifier string
-all
at the end:But the actual classifier is null and the real file is
test-project-0.1.0.jar
This does not happen when release plugin is removed and also does not happen if the repo is dirty. The default versionStrategy is a custom one that increments the minor scope of the plugin. So what is it about the dirty repo that might effect the shadow plugin?
I would be happy to upload a test project for you to play with, if you have the bandwidth.
Gradle 2.12 Release plugin 1.4.2
I have also raised the request https://github.com/ajoberstar/gradle-git/issues/206
Shadow Version
1.2.3
Gradle Version
2.12
Expected Behavior
Upload the shadow jar with publishShadowPublicationToMavenRepository should succeed
Actual Behavior
the
publishShadowPublicationToMavenRepository
task gets confused about the classifier(which I add as null) when using the release plugin.Gradle Build Script(s)
The file for the release plugin under gradle/ sub dir is
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)osboxes@osboxes:~/tr_workspace/sandbox$ jar tf build/libs/test-uber-jar-0.1.0.jar META-INF/ META-INF/MANIFEST.MF com/ com/tr/ com/tr/ap/ com/tr/ap/test_package/ com/tr/ap/test_package/HelloWorld.class