Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.0-beta-1
-
None
Description
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