Wrong dependency handling and problems with version ranges
----------------------------------------------------------
Key: MNG-787
URL: http://jira.codehaus.org/browse/MNG-787
Project: Maven 2
Type: Bug
Components: maven-artifact
Versions: 2.0-beta-1
Reporter: Carsten Ziegeler
Priority: Blocker
The current dependency mechanism does not use the versions specified in the POM
for compilation. It uses the most recent version from some transitive
dependency. An example is the xml-apis. If you specifiy e.g. version 1.3.02 in
your pom, version 2.0.2 is used comming from transitive dependencies.
Another problem is, as soon as you specify ranges for the version, you get an
exception:
If you specifiy e.g. [1.3.02] or [1.3.01,1.3.02] or [1.3.02, 1.3.03] you always
get the same NPE:
java.lang.NullPointerException: version was null for xml-apis:xml-apis
at
org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:295)
at
org.apache.maven.artifact.DefaultArtifact.getId(DefaultArtifact.java:202)
at
org.apache.maven.artifact.resolver.DebugResolutionListener.includeArtifact(DebugResolutionListener.java:56)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.fireEvent(DefaultArtifactCollector.java:275)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.fireEvent(DefaultArtifactCollector.java:254)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:166)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:204)
at
org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:70)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]