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.
--
View this message in context:
http://www.nabble.com/Version-range-special-cases--tp20480510p20480510.html
Sent from the Maven Developers mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]