You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2020/05/22 20:09:00 UTC

[jira] [Updated] (MNG-4457) dependency:resolve decides to take older (incompatible) version for transitive dep

     [ https://issues.apache.org/jira/browse/MNG-4457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov updated MNG-4457:
--------------------------------
    Fix Version/s:     (was: Issues to be reviewed for 3.x)

> dependency:resolve decides to take older (incompatible) version for transitive dep
> ----------------------------------------------------------------------------------
>
>                 Key: MNG-4457
>                 URL: https://issues.apache.org/jira/browse/MNG-4457
>             Project: Maven
>          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: Jason van Zyl
>            Priority: Major
>         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 was sent by Atlassian Jira
(v8.3.4#803005)