Version range of a dependency is not available if the dependency is found
transitively.
---------------------------------------------------------------------------------------
Key: MNG-4138
URL: http://jira.codehaus.org/browse/MNG-4138
Project: Maven 2
Issue Type: Bug
Components: Dependencies
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 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