-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make BOMs explicit 'minimal' dependencies so that Maven considers them as upstream #21769
Conversation
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>test</scope> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aloubyansky not sure why you didn't use scope test back then when introducing the bootstrap-bom?
@@ -40,6 +40,7 @@ | |||
<goal>unpack-dependencies</goal> | |||
</goals> | |||
<configuration> | |||
<excludeTypes>pom</excludeTypes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevents: Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No such archiver: 'pom'.
The number of dependencies being upacked is identical to the one before.
It looks like it could be fixed in Maven itself? There are BOM imports that are effectively dependencies, so these changes look redundant form that perspective? |
I agree that this seems like a bug/gap in Maven. IIRC there was a long standing issue for that. I'll try to find it. |
@aloubyansky I think I found that old ticket: https://issues.apache.org/jira/browse/MNG-5455 |
This PR adds a "minimal" dependecy to each pom.xml that already imports the respective BOM. This ensures that Maven considers those BOMs "upstream" modules, so that
mvn -am
can be used consistently.This is especially useful when bisecting, e.g. to find out when a test in a specific module became flaky (or broke entirely), so that you don't need to rebuild the entire project.
This PR also removes two redundant imports.
PS: I don't think we need "script support" for this because the places where BOMs are imported are rare and pretty "stable".