-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Allow spring-boot-maven-plugin RepackageMojo to use a source classifer #7659
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
Comments
Currently the Here's how we package up the Spring CLI app using the assembly plugin. Be aware that the latest version of the assembly plugin has a bug so make sure you use the version provided by our parent POM. |
Supporting a source classifier for |
@philwebb thanks for your response. I'll give assembly-plugin a chance and try to give my contribution in this enhancement when possible. |
@philwebb Maybe we should look for a file with that classifier and overwrite it the same way we do it for the standard jar. If we don't do anything we replace the artifact by default so it seems consistent to do the same if the classified jar already exists. The documentation of the classifier attribute will have to be adapted a bit though. |
@snicoll Do you mean use the |
I think that's not an issue. It's yet another advanced use case nobody complained about... |
I think this is an issue because doesn't make sense IMO the plugin defined inside the profile not take in consideration the artifact generated by this profile. In this case, an artifact with a classifier. Maybe is it necessary to create a new attribute? I was thinking about using the |
@tuliogomesbarbosa I think @snicoll means that reusing the existing |
oh sorry for the misunderstanding. I'll let you aware of my progress. |
How can i test plugin modifications? Through a local repository? I need to debug but maven is downloading the plugin from the remote repository... |
Look at src/it. We have integration tests there. |
I also have this issue, my main artifact has a classifier so the plugin throws "java.lang.IllegalArgumentException: Source must refer to an existing file". I added the classifier to the plugin so it works but I would rather not have to push the original jar. |
Conflicts: spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java
Hi, we're also facing this issue; we use the classifiers to mark our release-candidate builds, which get kicked via a dedicated maven profile on a parent pom. We can use the assembly workaround but it gets messy (we have to change a common ci pipeline to handle this corner cases). It would be nice though if the plugin could take care of this O:-) best regards, |
Closing in favour of PR #11061 |
* pr/11061: Polish "Allow repackage maven goal to take a source classifier" Allow repackage maven goal to take a source classifier
Hi,
i'm using spring-boot-maven-plugin to generate a fat jar that have jars (bouncycastle family) inside it .
I'm also using maven profiles to customize my generated jar with classifiers. Thus i have a maven-jar-plugin configured this way:
Debugging the spring-boot-maven-plugin i could see that the method Repackager.repackage (line 150, tag 1.4.2.RELEASE) does not consider the classified jar generated previously by maven-jar-plugin as a input.
My spring boot plugin configuration is as follow:
In short, after the build i got something like this:
PS: the raw jar doesn't have these manifest entries
Is this a bug or i'm missing some configuration?
Thanks in advance
The text was updated successfully, but these errors were encountered: