David Matejcek created MNG-5439:
-----------------------------------
Summary: Resolved 1.02 when declared [1.2.0]
Key: MNG-5439
URL: https://jira.codehaus.org/browse/MNG-5439
Project: Maven 2 & 3
Issue Type: Bug
Components: Dependencies
Affects Versions: 3.0.4, 3.0.3
Environment: Linux
Reporter: David Matejcek
Priority: Trivial
I have following versions in Archiva, artifact type is ear:
...
<version>1.2.0</version>
<version>1.02</version>
<version>1.2.1-SNAPSHOT</version>
...
The Installer's pom have dependency on this artifact:
<version>[1.2.0]</version>
But Maven 3.0.4 (same with 3.0.3) downloads a very old version 1.02 instead of
1.2.0.
When I change the dependency to <version>1.2.0</version>, Maven downloads the
correct version of artifact 1.2.0.
I think maven resolves [1.2.0] as a range, parses it as numbers and numerically
1.2.0 might be considered the same as 1.2.
This is incorrect, because version should be considered as a part of artifact
ID and I exactly declared which version I need - note that [1.2.0] is not a
range, but the most strict version dependency.
Workaround 1: Old versions have nonstandard versioning. They should be removed
from repository or renamed (f.e. 1.02 to 1.0.2).
Workaround 2: Change the artifact version to 2.0.0 or artifactId.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira