-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support attachMap
and attachSeed
independently of attach
#288
Comments
So attach is related to the outJar/inJar parameters. Attaching is not really needed for anything but automatically deploying the produced artifacts to a repository. You can leave attach as false and manually use https://www.mojohaus.org/build-helper-maven-plugin/attach-artifact-mojo.html to attach whatever artifacts you wish. So also if you want to obfuscate, but not deploy the obfuscated JAR, you could attach the seed and map files with the build-helper-maven-plugin. In your case where you obfuscate and replace the original JAR and attach and deploy the JAR, seed an map, I would say the configuration you use is correct and fine. |
Yes, I am trying to attach the files for deployment to a remote repository. Thanks for the link to the Build Helper Maven Plugin; but since attaching map and seed file is already part of the ProGuard Maven Plugin (with the limitation described in this issue here), I would like to avoid using the Build Helper Maven Plugin because it would make my
Regarding this "and attach [...] the JAR" part in your message (emphasis mine), that is why this workaround mentioned in the issue description feels so hacky, because it does not attach the JAR (the case proguard-maven-plugin/src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java Lines 843 to 853 in 790b51e
And the workaround is also quite error-prone; you have to tweak other parameters (in this case So to summarize, what I would like is to have the following deployed artifacts:
The situation that I would like to avoid:
I think from a technical perspective there is nothing which would prevent making proguard-maven-plugin/src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java Lines 855 to 862 in 790b51e
|
Yes, I think we could just move the attachMap and attachSeed conditions to be fully separate from attach condition. It make make sense to rename attach to be attachJar then for consistency, but that would be a breaking change. |
Before doing a full rename, it might be possible to keep the existing Though maybe this could still be considered a slight backward incompatible change since the behavior of |
I think that is a good strategy:
|
Currently the parameters
attachMap
andattachSeed
only have an effect ifattach
is set as well.However, there might be cases where it would be useful to replace the final JAR file (i.e.
attach=false
), but still useattachMap=true
to attach the mappings to make troubleshooting later easier.Would it be possible to decouple these options so they are independent of
attach
?Workaround
Set
attach=true
andappendClassifier=false
, and thenattachMap=true
orattachSeed=true
.It appears this will then make the plugin use the same output name as the original JAR file, therefore replacing it and not additionally attaching the processed JAR.
But that feels rather hacky and I am not sure if that is officially supported usage of the plugin, since it defeats the purpose of
attach=true
.The text was updated successfully, but these errors were encountered: