Added some javadoc

Added javadoc help for making easier to compare two versions in command line.
This commit is contained in:
LuboVarga 2017-03-13 13:23:04 +01:00 committed by GitHub
parent 181b0215aa
commit 10a18cfee7
1 changed files with 12 additions and 1 deletions

View File

@ -472,8 +472,19 @@ public int hashCode()
/**
* Main to test version parsing and comparison.
* <p>
* To check how "1.2.7" compares to "1.2-SNAPSHOT" for example, you can issue
* <code>java -cp ~/.m2/repository/org/apache/maven/maven-artifact/3.3.9/maven-artifact-3.3.9.jar org.apache.maven.artifact.versioning.ComparableVersion "1.2.7" "1.2-SNAPSHOT"</code>
* command to commandline. Result of given command will be something like this:
* <pre
* Display parameters as parsed by Maven (in canonical form) and comparison result:
* 1. 1.2.7 == 1.2.7
* 1.2.7 > 1.2-SNAPSHOT
* 2. 1.2-SNAPSHOT == 1.2-snapshot
* </pre>
*
* @param args the version strings to parse and compare
* @param args the version strings to parse and compare. You can pass arbitrary number of version strings and always
* two adjacent will be compared
*/
public static void main( String... args )
{