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

[MNG-8527] Re-enable consumer POM, remove unwanted managed dependencies, developers, contributors, mailing lists and issue management (to discuss) #2058

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Jan 22, 2025

JIRA issue: MNG-8527

This PR aims at:

  • enabling again the consumer POM on Maven 4 for all models, not only 4.1.0 models
  • reducing the size of consumer POMs

This last item was really problematic and one of the reason why it was disabled for 4.0.0.
When a project imports huge BOMs (and sometimes cascading), you could end up with tons of managed dependencies that were inlined in the consumer BOM (it has no parent and no imports).
This PR fixes the problem by making sure only the managed dependencies that can actually have an effect are kept in the consumer POM.

It also removes informational data:

  • developers
  • contributors
  • mailing lists
  • issue management

I think those informations are not important on the consumer POM and are better related to build POMs.

…es, developers, contributors, mailing lists and issue management (to discuss)
@gnodet gnodet marked this pull request as ready for review January 22, 2025 22:09
@gnodet gnodet added this to the 4.0.0-rc-3 milestone Jan 23, 2025
# Conflicts:
#	impl/maven-core/src/test/java/org/apache/maven/internal/transformation/AbstractRepositoryTestCase.java
#	impl/maven-core/src/test/java/org/apache/maven/internal/transformation/impl/ConsumerPomBuilderTest.java
managedDeps.keySet().retainAll(nodes.keySet());

directDeps.replaceAll((key, dep) -> {
var managedDep = managedDeps.get(key);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dep --> dependency here and elsewhere. In general, avoiding abbreviations in variable names and elsewhere improves readability.

@gnodet
Copy link
Contributor Author

gnodet commented Jan 26, 2025

I need to add an IT which will test dependency management pruning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants