remove the snapshot in comparison for tests - this will make them much more readable and we have no need to differentiate

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@739122 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-01-30 01:26:27 +00:00
parent 58d995c047
commit 1421a185a4
1 changed files with 12 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public abstract class AbstractMavenIntegrationTestCase
ArtifactVersion version = getMavenVersion();
if ( version != null )
{
skip = !versionRange.containsVersion( version );
skip = !versionRange.containsVersion( removeSnapshot( version ) );
}
else
{
@ -129,7 +129,7 @@ public abstract class AbstractMavenIntegrationTestCase
ArtifactVersion version = getMavenVersion();
if ( version != null )
{
return versionRange.containsVersion( version );
return versionRange.containsVersion( removeSnapshot( version ) );
}
else
{
@ -225,4 +225,14 @@ public abstract class AbstractMavenIntegrationTestCase
return localRepo;
}
private static ArtifactVersion removeSnapshot( ArtifactVersion version )
{
String v = version.toString();
if ( v.endsWith( "-SNAPSHOT" ) )
{
return new DefaultArtifactVersion( v.substring( 0, v.length() - 9 ) );
}
return version;
}
}