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
With the above configuration and execution, the resulting JAR name under target/ is: xxxxxxx-shaded-obfuscated.jar
While the installed JAR (under .m2) name is: xxxxxxx-obfuscated.jar
The expected behavior is that in both cases the name would be: xxxxxxx-obfuscated.jar
(as it's based on the ${project.build.finalName} with an addition of attachArtifactClassifier value.)
So, the erroneous behavior is that the classifier is appended to the injar named file, instead of the project main artifact name.
Affected version of the plugin: 2.2.0. (Same happens also with 2.0.14.)
The text was updated successfully, but these errors were encountered:
wheredevel
changed the title
The name of the "proguarded" JAR under target/ is different from the one installed.
The name of the "proguarded" JAR under target/ is different from the one installed under .m2.
Mar 29, 2020
Any plans to address this? Feeding <artifactId>-<version>-shaded.jar to the proguard plugin seems to be one of the major use cases.
This behavior makes it impossible to reference the output of the proguard plugin in an assembly descriptor. E.g. this fails because the proguard plugin generates a file named <artifactId>-<version>-shaded-obfuscated.jar, but attaches it with the classifier -obfuscated, and the assembly plugin cannot find it because it looks for <artifactId>-<version>-obfuscated.jar:
To workaround, we have to use <attach>false</attach> and sepearately attach the outJar with the build-helper-maven-plugin in order for the assembly descriptor to work as expected.
Edit:
My bad, the assembly descriptor was missing <useProjectAttachments>true</useProjectAttachments> in the dependencySet configuration in order to be able to resolve attached artifacts.
The file in the target folder does still have a different name than the one installed in the local repo, though.
Here's the portion of the plugin configuration:
Here's the portion of the plugin execution:
With the above configuration and execution, the resulting JAR name under target/ is:
xxxxxxx-shaded-obfuscated.jar
While the installed JAR (under .m2) name is:
xxxxxxx-obfuscated.jar
The expected behavior is that in both cases the name would be:
xxxxxxx-obfuscated.jar
(as it's based on the ${project.build.finalName} with an addition of
attachArtifactClassifier
value.)So, the erroneous behavior is that the classifier is appended to the
injar
named file, instead of the project main artifact name.Affected version of the plugin: 2.2.0. (Same happens also with 2.0.14.)
The text was updated successfully, but these errors were encountered: