yes, there are special cases hardwired, that were not meant to be weird but useful features added to Maven Artifact 3.0 :) see the proposal [1], the current implementation [2] and test-case [3]
the rationale is that snapshot < alpha < beta < milestone < release candidate < release < service pack regards, Hervé [1] http://docs.codehaus.org/display/MAVEN/Versioning [2] http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java?view=markup [3] http://svn.apache.org/viewvc/maven/artifact/trunk/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java?view=markup Le jeudi 13 novembre 2008, Dave Syer a écrit : > Can anyone explain why the first test succeeds (as expected) but the second > and third fails? > > @Test > public void testVanillaVersionRangeExcludesDotQualifier() throws > Exception > { > VersionRange range = > VersionRange.createFromVersionSpec("[1.0.0,2.0.0)"); > assertFalse(range.containsVersion(new > DefaultArtifactVersion("2.0.0.RELEASE"))); > } > > @Test > public void testVanillaVersionRangeExcludesDotQualifierMilestone() > throws > Exception { > VersionRange range = > VersionRange.createFromVersionSpec("[1.0.0,2.0.0)"); > // Fails even in Maven 3.0 > assertFalse(range.containsVersion(new > DefaultArtifactVersion("2.0.0.M1"))); > } > > @Test > public void > testVanillaVersionRangeExcludesDotQualifierReleaseCandidate() > throws Exception { > VersionRange range = > VersionRange.createFromVersionSpec("[1.0.0,2.0.0)"); > // Fails even in Maven 3.0 > assertFalse(range.containsVersion(new > DefaultArtifactVersion("2.0.0.RC1"))); > } > > It seems like there is some weird special case hard wired to recognise "M" > and "RC" as special prefixes (and do the wrong thing with them - as far as > I can see). > > This is with 3.0-alpha-2-SNAPSHOT version of maven-artifact. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
