FAQ
Author: brett
Date: Mon Sep 12 22:44:07 2005
New Revision: 280509

URL: http://svn.apache.org/viewcvs?rev=280509&view=rev
Log:
correct parsing of versions that appear to have a build number, but don't otherwise match the format

Modified:
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java

Modified: maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java?rev=280509&r1=280508&r2=280509&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java (original)
+++ maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java Mon Sep 12 22:44:07 2005
@@ -188,6 +188,7 @@
{
// qualifier is the whole version, including "-"
qualifier = version;
+ buildNumber = null;
}
}
else

Modified: maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java?rev=280509&r1=280508&r2=280509&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java (original)
+++ maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/DefaultArtifactVersionTest.java Mon Sep 12 22:44:07 2005
@@ -119,6 +119,13 @@
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()



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesmaven
postedSep 13, '05 at 5:44a
activeSep 13, '05 at 5:44a
posts1
users1
websitemaven.apache.org
irc#maven

1 user in discussion

Brett: 1 post

People

Translate

site design / logo © 2021 Grokbase