Paolo Compieta (JIRA)
Fri, 20 Nov 2009 03:16:21 -0800
[
http://jira.codehaus.org/browse/MNG-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=198817#action_198817
]
Paolo Compieta edited comment on MNG-4457 at 11/20/09 5:14 AM:
---------------------------------------------------------------
1) ok
2) ok
3) i added C only in the second example, to show a 'normal' (IMO) resolution to
1.3.0; in the first example there were only A and B, and Maven didn't pick the
closest
I still see this last case as a problem:
- A resolves 1.3.0 via B via DepMgmt, 2 hops
- B has 1.4.1, 1 hop
So, should B win? (case: m2WrongTransitiveDepResolve.zip)
If no, i agree to close this issue.
was (Author: paolo.compieta):
1) ok
2) ok
3) i added C only in the second example, to show a 'normal' (IMO) resolution to
1.3.0; in the first example there were only A and B, and Maven didn't pick the
closest
I still see this last case as a problem:
- A resolves 1.3.0 via B via DepMgmt, 2 hops
- B has 1.4.1, 1 hop
So, should B win? (case: m2WrongTransitiveDepResolve.zip)
If no, i agree to close this issue.
> dependency:resolve decides to take older (incompatible) version for
> transitive dep
> ----------------------------------------------------------------------------------
>
> Key: MNG-4457
> URL: http://jira.codehaus.org/browse/MNG-4457
> Project: Maven 2
> Issue Type: Bug
> Components: Artifacts and Repositories
> Affects Versions: 2.2.1
> Environment: WinXp
> Maven 2.0.9/2.2.1
> Reporter: Paolo Compieta
> Assignee: Brian Fox
> Attachments: m2FairTransitiveDepResolve.zip,
> m2WrongTransitiveDepResolve.zip
>
>
> I'll use modules Parent,ModuleA,ModuleB,ModuleEAR and dependency Commons-Net
> to explain the case.
> Parent specifies commons-net/1.3.0 in dependencyManagement
> \- ModuleB declares commons-net/1.4.1 as dependency (overrides version), and
> resolves correctly 1.4.1
> \- ModuleA declares ModuleB as dependency (obtaining transitive dep to
> commons-net), and resolves *erroneously* 1.3.0
> \- ModuleC (ear) takes in 1.3.0 whilst no module is actually using or
> declaring it
> I'd expect this case to resolve 1.4.1 or at least to fail the build, because
> in this example B is the only one using commons-net (maybe exploiting
> 1.4.1-only features), while the final build resolves 1.3.0 (see ModuleA or
> ModuleC).
> I'm not 100% which is the best policy, but i've got problems (wrong jars,
> different behaviours and runtime errors) with this kind silent
> down-resolution of version.
> Regards,
> Paolo
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira