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
When the spring-boot-maven-plugin performs the repackage goal the POM order of the libraries is not maintained #8397
Comments
Any update when this could be triaged? Thanks |
One option might be to do the filtering on a new set, then use that to remove items from the original set. |
Are you commenting on how to fix it or how to work around? |
Just a note to myself or whoever picks it up that we might be able to fix it without changing those Maven plugins. We'll need to change the code for sure, I can't see a way to work around the issue without that. |
@marioja this is going to be available in the next |
What are the maven coordinates to get that build snapshot?
Mario
On Mar 1, 2017, at 07:21, Stéphane Nicoll <notifications@github.com<mailto:notifications@github.com>> wrote:
@marioja<https://github.com/marioja> this is going to be available in the next 1.5.2.BUILD-SNAPSHOT. If you can give it a try and report back that would be great!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#8397 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAC_rIrrpYiFmx9jqP6sJIZpkjw-px7Oks5rhWKagaJpZM4MKxmb>.
|
I am not following. Just use Spring Boot |
My bad, what I meant was do I get this snapshot from Maven Central or do I need special POM configuration to get this snapshot? How do I know when and if the snapshot ran? |
Ok, a little of Googling told me that the snapshot repository lives at this location. Is there a fail proof way of discovering this? In my POM, I specify the snapshot repository in the distribution management section but I could not find it in the Spring Boot pom. |
@marioja I already replied you and http://projects.spring.io/spring-boot/ has more info. If you're still confused, please join us on gitter and let's chat there rather than adding noise here. |
When this maven issue was fixed in maven 2.0.9 the
java.util.LinkedHashSet
was used instead of thejava.util.HashSet
. When the spring-boot-maven-plugin performs the repackage goal using theAbstractDependencyFilterMojo.filterDependencies
method theorg.apache.maven.shared.artifact.filter.collection.FilterArtifacts.filter
method will be called and will try to apply all of the filters in its filters ArrayList fields. In my particular case, the ArrayList contained 4 entries which were:org.springframework.boot.maven.ExcludeFilter
org.apache.maven.shared.artifact.filter.collection.ScopeFilter
org.apache.maven.shared.artifact.filter.collection.ArtifactIdFilter
org.springframework.boot.maven.MatchingGroupIdFilter
They are all using
HashSet
instead ofLinkedHashSet
. This breaks the POM order for libraries and should be fixed. It looks like two are in the Spring Boot maven plugin which should be easy to fix but the others would require maven source changes. I do not know what other filters could be used over and above the 4 were in my case but they would also need to be changed.Fixing this bug will give users some control of the classpath ordering when launching a jar file.
The text was updated successfully, but these errors were encountered: