[
https://issues.apache.org/jira/browse/MENFORCER-426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702959#comment-17702959
]
Slawomir Jaranowski commented on MENFORCER-426:
-----------------------------------------------
Old used https://github.com/apache/maven-dependency-tree a helper library to
introduce comaability for Maven 2.x and 3.x.
Now as plugin require Maven 3.2.5 we can use Resolver API directly ...
Collect dependencies for project return nodes:
{code}
Node: test:menforcer426:jar:1.0 data map: {}
Node: org.apache.maven.plugins.enforcer.its:menforcer426-a:jar:1.0 (compile)
data map: {conflict.originalScope=compile, conflict.originalOptionality=false}
Node: org.apache.maven.plugins.enforcer.its:menforcer426-b:jar:1.0
(compile) data map: {conflict.originalScope=compile,
conflict.originalOptionality=false}
Node: org.apache.maven.plugins.enforcer.its:menforcer128_api:jar:1.4.0
(compile) data map:
{conflict.winner=org.apache.maven.plugins.enforcer.its:menforcer128_api:jar:1.6.0
(compile), conflict.originalScope=compile, conflict.originalOptionality=false}
Node: org.apache.maven.plugins.enforcer.its:menforcer128_api:jar:1.6.0
(compile) data map: {conflict.originalScope=compile,
conflict.originalOptionality=false}
{code}
{{menforcer128_api}} is used with version range in {{menforcer426-a}} and in
{{menforcer426-b}} but different version is resolved from range depends on
level and if winner is pressent.
[~cstamas] - Can you look on it? For me looks like a bug in resolver.
> DependencyConvergence in 3.1.0 fails when using version ranges
> --------------------------------------------------------------
>
> Key: MENFORCER-426
> URL: https://issues.apache.org/jira/browse/MENFORCER-426
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: dependencyConvergence, Standard Rules
> Affects Versions: 3.1.0
> Reporter: Joe Barnett
> Assignee: Slawomir Jaranowski
> Priority: Major
> Fix For: 3.3.0
>
>
> In our project, using version 3.0.0-M3 of the maven-enforcer-plugin's
> DependencyConvergence rule passes. Using version 3.1.0 starts to show
> convergence errors that I believe may be related to using version ranges to
> declare dependencies:
> {code:java}
> [WARNING]
> Dependency convergence error for com.trib3:graphql:jar:1.32.3279:compile
> paths to dependency are:
> +-com.joe.quizzy:server:jar:1.0-SNAPSHOT
> +-com.joe.quizzy:graphql:jar:1.0-SNAPSHOT:compile
> +-com.trib3:graphql:jar:1.32.3279:compile
> and
> +-com.joe.quizzy:server:jar:1.0-SNAPSHOT
> +-com.trib3:graphql:jar:1.32.3324:compile
> {code}
> both {{com.joe.quizzy:server}} and {{com.joe.quizzy:graphql}} declare a
> dependency on {{com.trib3:graphql}}, with a version of
> {{[1.32.1,1.33-SNAPSHOT)}}. that version range should (currently) resolve to
> 1.32.3324 in both usages, but in enforcer 3.1.0's DependencyConvergence check
> does not.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)