-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added option to choose dependency source for BOM #39
Conversation
@ragnarruutel the source of the BOM dependencyManagement should always be the builder's dependencyManagement, which you then filter using I have yet to give it a deep look at what you report as not working, but by definition I would prefer that we don't throw the builder's dependencies in the mix to build the BOM, cause those may be there for other purposes (another plugin for instance). As a matter of fact we once had issues with Maven dependencies itself and had to deeply rework the internal resolving wrt exclusions. Anyway like I said, will need more time to look at this, just wanted you to know that by definition you are going in a direction (using builder dependencies) that is problematic, that you should try to solve it with current plugin configuration means. PS: We are reworking WildFly BOMs and we are introducing significant multi module relations, feel free to have a look how we are doing at wildfly/wildfly#17990 , we tend to prefer using includeDependencies over excludeDependencies tho |
@emmartins I didn't do a good job explaining my problem so I will try to give an example. I have multi module project with this structure:
This is what the
The
If I run I suppose one solution could be to explicitly use PS. I looked at your PR and it seems this approach is extensively used for Wildfly but I would argue that using project dependencies would ease maintenance for projects that build BOMs from pom.xml files. |
@ragnarruutel I am going to merge this, the change impact in default behavior is null, and there is no need to maintain any additional code. Still, please understand this new way to use the plugin can become a mess if the bom builder project has a need for dependencies, or uses a parent with dependencies that you don't control, use it carefully. Thanks a lot for the integration testsuite contribution. |
There is a problem when creating BOM for module in multi module project. If for example dependency is included in parent project dependency management and not used by module for which you want to create BOM, then unused dependency will be included into bom-pom.xml I've added integration test
src/it/multi-module-pom
to illustrate this problem.PS. To run integration tests hit
mvn clean install invoker:run