proguard-maven-plugin
proguard-maven-plugin copied to clipboard
The name of the "proguarded" JAR under target/ is different from the one installed under .m2.
Here's the portion of the plugin configuration:
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>${proguard-maven-plugin.version}</version>
<configuration>
<attach>true</attach>
<attachArtifactClassifier>obfuscated</attachArtifactClassifier>
...
<configuration>
</plugin>
Here's the portion of the plugin execution:
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<injar>${project.build.finalName}-shaded.jar</injar>
</configuration>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
</plugin>
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.)