mirror of https://github.com/apache/maven.git
correct parsing of versions that appear to have a build number, but don't otherwise match the format
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
be460f201a
commit
8cad4f0854
|
@ -188,6 +188,7 @@ public class DefaultArtifactVersion
|
|||
{
|
||||
// qualifier is the whole version, including "-"
|
||||
qualifier = version;
|
||||
buildNumber = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -119,6 +119,13 @@ public class DefaultArtifactVersionTest
|
|||
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
||||
assertEquals( "check build number", 0, version.getBuildNumber() );
|
||||
assertEquals( "check qualifier", "02", version.getQualifier() );
|
||||
|
||||
version = new DefaultArtifactVersion( "PATCH-1193602" );
|
||||
assertEquals( "check major version", 0, version.getMajorVersion() );
|
||||
assertEquals( "check minor version", 0, version.getMinorVersion() );
|
||||
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
||||
assertEquals( "check build number", 0, version.getBuildNumber() );
|
||||
assertEquals( "check qualifier", "PATCH-1193602", version.getQualifier() );
|
||||
}
|
||||
|
||||
public void testVersionComparing()
|
||||
|
|
Loading…
Reference in New Issue