-
Notifications
You must be signed in to change notification settings - Fork 47
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
Rewrite dependencies resolution in AbstractResolveDependencies. #303
base: master
Are you sure you want to change the base?
Conversation
Use repositorySystem.resolveDependencies() to fold collection and resolution steps into one. Use filters for resolveDependencies() call. Do not pre-filter dependencies. Fixes mojohaus#302.
Allow slight variation in expected messages.
Thanks for PR. dependency:tree has a bug for such cases https://issues.apache.org/jira/browse/MDEP-909 @cstamas please also look |
Why? The filter does it for us during the collection. For my test case, the provided dependency gets filtered out correctly. |
When I was looking into this, I looked around the other sources. I saw |
This looks correct in Maven3 universe. Due being in "maven3 universe" it suffers from MNG-8041, but is acceptable. |
@cstamas we should be consequently - we did filtering before resolving in m-assembly-p So how plugins should resolve dependencies tree with given scope ...? another issue with the similar problem https://issues.apache.org/jira/browse/MINVOKER-368 |
Right. This all evolves around MNG-8041 where maven3 provides "wrong runtime" classpath/tree. Reason is that at the "start" in includes unwanted scopes like test scope, that "eclipses" possible runtime dependencies lower in tree, and finally dep filter removes "test" scope as well (and the losers are removed by conflict resolution before that) and classpath ends up being incomplete, as explained here: https://maven.apache.org/resolver-archives/resolver-2.0.0-alpha-11/common-misconceptions.html So, I do agree with @slawekjaranowski we should align these plugin scattered "fixes", until Maven4 API generally provides fixed and one-shop solution for all. |
Use repositorySystem.resolveDependencies() to fold collection and resolution steps into one.
Use filters for resolveDependencies() call. Do not pre-filter dependencies.
Fixes #302.