You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Benedict (JIRA)" <ji...@codehaus.org> on 2014/07/02 15:45:02 UTC
[jira] (MNG-4138) Version range of a dependency is not available if
the dependency is found transitively.
[ https://jira.codehaus.org/browse/MNG-4138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated MNG-4138:
-------------------------------
Fix Version/s: (was: Issues to be reviewed for 3.x)
> Version range of a dependency is not available if the dependency is found transitively.
> ---------------------------------------------------------------------------------------
>
> Key: MNG-4138
> URL: https://jira.codehaus.org/browse/MNG-4138
> Project: Maven
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 2.0.10, 2.1.0
> Reporter: Paul Gier
>
> The behaviour is like this:
> If I have a pom with a single dependency with a version range like this.
> {code:xml}
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>[3.0, 3.8.2)</version>
> </dependency>
> {code}
> I can access the version range using the resolved dependency artifact.
> {code:java}
> Set artifacts = project.getDependencyArtifacts();
> artifact.getVersionRange();
> {code}
> If the same dependency is picked up transitively from another dependency, for example junit is a trasitive dependency of maven-project:
> {code:xml}
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-project</artifactId>
> <version>2.0.8</version>
> </dependency>
>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>[3.0, 3.8.2)</version>
> </dependency>
> {code}
> Now the VersionRange object is returned, but it only contains the resolved version. For example "3.8.1".
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)