Well, I wrote a simple program to compare the two versions and it
reports 2.0 to be same as 2.0.0.
// Main.java
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
class Main {
public static void main(String... args) {
if (args.length == 1) {
DefaultArtifactVersion mv = new DefaultArtifactVersion(args[0]);
System.out.println(mv.getMajorVersion() + ", " +
mv.getMinorVersion() + ", " +
mv.getIncrementalVersion() + ", " +
mv.getQualifier());
} else {
DefaultArtifactVersion mv1 = new DefaultArtifactVersion(args[0]);
DefaultArtifactVersion mv2 = new DefaultArtifactVersion(args[1]);
System.out.println(mv1.compareTo(mv2));
}
}
}
Thanks,
Sahoo
Jim Sellers wrote:
I assume that maven treats them as Strings internally, not doubles.
Just like version 3.0-RC1 and 1.0.3-beta3 are valid versions.
HTH
Jim
On Sat, Jun 13, 2009 at 11:17 AM, Sahoo <[email protected]> wrote:
It's quite annoying to see that some code path in maven (I am on version
2.0.9) does not think 2.0 is same as 2.0.0. I just tried to configure
maven-bundle-plugin and specified the version as 2.0 and maven failed to
locate the version. See error message below:
/Reason: POM 'org.apache.felix:maven-bundle-plugin' not found in
repository: Unable to download the artifact from any repository
org.apache.felix:maven-bundle-plugin:pom:2.0
/
As soon as I specified the version as 2.0.0, it found it. Strange, I must
say.
Thanks,
Sahoo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]