Skip to content
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

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Conversation

famod
Copy link
Member

@famod famod commented Nov 29, 2021

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".

@quarkus-bot quarkus-bot bot added area/core area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven area/testing labels Nov 29, 2021
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
Copy link
Member Author

@famod famod Nov 29, 2021

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>
Copy link
Member Author

@famod famod Nov 29, 2021

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.

@aloubyansky
Copy link
Member

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?

@famod
Copy link
Member Author

famod commented Nov 29, 2021

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.
Maven is not released that often and bigger changes like this are not material for a patch release.

@aloubyansky aloubyansky merged commit e7aa961 into quarkusio:main Nov 29, 2021
@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Nov 29, 2021
@famod famod deleted the bom-upstream branch November 29, 2021 22:29
@famod
Copy link
Member Author

famod commented Nov 29, 2021

@aloubyansky I think I found that old ticket: https://issues.apache.org/jira/browse/MNG-5455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven area/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants