Skip to content

[MNG-8041] A quick draft about problem#1398

Draft
cstamas wants to merge 2 commits intoapache:masterfrom
cstamas:MNG-8041
Draft

[MNG-8041] A quick draft about problem#1398
cstamas wants to merge 2 commits intoapache:masterfrom
cstamas:MNG-8041

Conversation

@cstamas
Copy link
Copy Markdown
Member

@cstamas cstamas commented Feb 5, 2024

This is just a attempt to fix reproducer, and to see what ITs have to say.

https://github.com/cstamas/MNG-8041 is a reproducer: when asked mvn provisio:provision the lib will lack guava, while it should be part of runtime dependency (and actually IS, when the project is used as dependency!).


https://issues.apache.org/jira/browse/MNG-8041

Collection<String> resolveScopesToExclude = negate(scopesToResolve);

DependencyFilter collectionFilter = new ScopeDependencyFilter(null, collectScopesToExclude);
DependencyFilter resolutionFilter = new ScopeDependencyFilter(null, resolveScopesToExclude);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we just use the scopes to collect / resolve instead of the ones to exclude and give them as a negative test in the filter ?
i.e.:

DependencyFilter collectionFilter = new ScopeDependencyFilter(scopesToCollect);
DependencyFilter resolutionFilter = new ScopeDependencyFilter(scopesToResolve);

# Conflicts:
#	maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
@jira-importer
Copy link
Copy Markdown

Resolve #10874

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