How to use 5 digit version numbers with Maven ?
We need to use 5 digit version numbers going forward. Maven only handles 3 digit version numbers using the versions-maven-plugin. Is there a way to use 5 digits for project.version ? What we want to do is use 1.2.3.4.5-SNAPSHOT vs 1.2.3-SNAPSHOT and 1.2.3.4.5 vs 1.2.3 after the release. cheers, mehul -- Mehul N. Sanghvi email: mehul.sang...@gmail.com
Re: How to use 5 digit version numbers with Maven ?
Yes, you can use the Mercury version numbering scheme for artifacts having the 5 digit version number. Create a version rules XML file that specifies which artifacts use Mercury and which artifacts use Maven version schemes. Pass the file using the versions plugin's rulesUri or -Dmaven.version.rules... > On Jan 7, 2016, at 6:08 AM, Mehul Sanghvi wrote: > > We need to use 5 digit version numbers going forward. Maven only handles 3 > digit version numbers > using the versions-maven-plugin. Is there a way to use 5 digits for > project.version ? > > What we want to do is use 1.2.3.4.5-SNAPSHOT vs 1.2.3-SNAPSHOT and > 1.2.3.4.5 vs 1.2.3 after > the release. > > > > cheers, > > mehul > > -- > Mehul N. Sanghvi > email: mehul.sang...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to use 5 digit version numbers with Maven ?
Is there documentation on the mercury scheme ? I tried following the link at http://www.mojohaus.org/versions-maven-plugin/version-rules.html, but that just gives me a "Page Not Found". cheers, mehul On Thu, Jan 7, 2016 at 7:27 AM, Robert Patrick wrote: > Yes, you can use the Mercury version numbering scheme for artifacts having > the 5 digit version number. Create a version rules XML file that specifies > which artifacts use Mercury and which artifacts use Maven version schemes. > Pass the file using the versions plugin's rulesUri or > -Dmaven.version.rules... > > > On Jan 7, 2016, at 6:08 AM, Mehul Sanghvi > wrote: > > > > We need to use 5 digit version numbers going forward. Maven only > handles 3 > > digit version numbers > > using the versions-maven-plugin. Is there a way to use 5 digits for > > project.version ? > > > > What we want to do is use 1.2.3.4.5-SNAPSHOT vs 1.2.3-SNAPSHOT and > > 1.2.3.4.5 vs 1.2.3 after > > the release. > > > > > > > > cheers, > > > > mehul > > > > -- > > Mehul N. Sanghvi > > email: mehul.sang...@gmail.com > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Mehul N. Sanghvi email: mehul.sang...@gmail.com
RE: How to use 5 digit version numbers with Maven ?
Like many more advanced Maven scenarios, the documentation is sketchy at best. Here is an example version rules xml file http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd";> -Original Message- From: Mehul Sanghvi [mailto:mehul.sang...@gmail.com] Sent: Thursday, January 07, 2016 6:31 AM To: Maven Users List Subject: Re: How to use 5 digit version numbers with Maven ? Is there documentation on the mercury scheme ? I tried following the link at http://www.mojohaus.org/versions-maven-plugin/version-rules.html, but that just gives me a "Page Not Found". cheers, mehul On Thu, Jan 7, 2016 at 7:27 AM, Robert Patrick wrote: > Yes, you can use the Mercury version numbering scheme for artifacts > having the 5 digit version number. Create a version rules XML file > that specifies which artifacts use Mercury and which artifacts use Maven > version schemes. > Pass the file using the versions plugin's rulesUri or > -Dmaven.version.rules... > > > On Jan 7, 2016, at 6:08 AM, Mehul Sanghvi > wrote: > > > > We need to use 5 digit version numbers going forward. Maven only > handles 3 > > digit version numbers > > using the versions-maven-plugin. Is there a way to use 5 digits for > > project.version ? > > > > What we want to do is use 1.2.3.4.5-SNAPSHOT vs 1.2.3-SNAPSHOT and > > 1.2.3.4.5 vs 1.2.3 after > > the release. > > > > > > > > cheers, > > > > mehul > > > > -- > > Mehul N. Sanghvi > > email: mehul.sang...@gmail.com > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Mehul N. Sanghvi email: mehul.sang...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to use 5 digit version numbers with Maven ?
Hi, On 1/7/16 1:08 PM, Mehul Sanghvi wrote: We need to use 5 digit version numbers going forward. Maven only handles 3 digit version numbers where is this documented ? which is simply not true. https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning Since Maven 3 you can use as many version numbers as you like... using the versions-maven-plugin. Is there a way to use 5 digits for project.version ? What we want to do is use 1.2.3.4.5-SNAPSHOT vs 1.2.3-SNAPSHOT and 1.2.3.4.5 vs 1.2.3 after the release. You should simply use itcause it works... Furthermore if you use Maven 3.2.5+ you can check the behaviour on command line via: (You have to change the maven-artifact-VERSION.jar accordingly to your Maven installation) this small CLI app which is included in your maven distribution: ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar 1.0.2.5-SNAPSHOT 1.0.2.6-SNAPSHOT Display parameters as parsed by Maven (in canonical form) and comparison result: 1. 1.0.2.5-SNAPSHOT == 1.0.2.5-snapshot 1.0.2.5-SNAPSHOT < 1.0.2.6-SNAPSHOT 2. 1.0.2.6-SNAPSHOT == 1.0.2.6-snapshot ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar 1.0.2.5.0.0-SNAPSHOT 1.0.2.6.0.0-SNAPSHOT Display parameters as parsed by Maven (in canonical form) and comparison result: 1. 1.0.2.5.0.0-SNAPSHOT == 1.0.2.5-snapshot 1.0.2.5.0.0-SNAPSHOT < 1.0.2.6.0.0-SNAPSHOT 2. 1.0.2.6.0.0-SNAPSHOT == 1.0.2.6-snapshot ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar 1.0.2.5.10.0-SNAPSHOT 1.0.2.6.0.0-SNAPSHOT Display parameters as parsed by Maven (in canonical form) and comparison result: 1. 1.0.2.5.10.0-SNAPSHOT == 1.0.2.5.10-snapshot 1.0.2.5.10.0-SNAPSHOT < 1.0.2.6.0.0-SNAPSHOT 2. 1.0.2.6.0.0-SNAPSHOT == 1.0.2.6-snapshot ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar 1.0.2.5.100.0-SNAPSHOT 1.0.2.6.0.0-SNAPSHOT Display parameters as parsed by Maven (in canonical form) and comparison result: 1. 1.0.2.5.100.0-SNAPSHOT == 1.0.2.5.100-snapshot 1.0.2.5.100.0-SNAPSHOT < 1.0.2.6.0.0-SNAPSHOT 2. 1.0.2.6.0.0-SNAPSHOT == 1.0.2.6-snapshot Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to use 5 digit version numbers with Maven ?
in fact, the way the issue is described is misleading: "How to use 5 digit version numbers with Maven ?" and "Maven only handles 3 digit version numbers using the versions-maven-plugin" it should be phrased: "How to use 5 digit version numbers with versions-maven-plugin?" and "versions-maven-plugin only handles 3 digit version numbers" because Maven itself has no limitation on digits: like Karl Heinz pointed out, there was a limitation in Maven 2, but it was removed in Maven 3 with https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning and FYI, Maven itself does only comparison on versions, no updates Plugins can do a lot of different things, and multiple plugins propose to update version: the most known being maven-release-plugin (from Apache Maven team) and versions-maven-plugin (from MojoHaus team) Regards, Hervé (who worked hard a few yeas ago on removing the limitation in Maven 3 :) ) Le jeudi 7 janvier 2016 20:16:44 Karl Heinz Marbaise a écrit : > Hi, > > On 1/7/16 1:08 PM, Mehul Sanghvi wrote: > > We need to use 5 digit version numbers going forward. Maven only handles > > 3 > > digit version numbers > > where is this documented ? > > which is simply not true. > > https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning > > Since Maven 3 you can use as many version numbers as you like... > > > using the versions-maven-plugin. Is there a way to use 5 digits for > > project.version ? > > > > What we want to do is use 1.2.3.4.5-SNAPSHOT vs 1.2.3-SNAPSHOT and > > 1.2.3.4.5 vs 1.2.3 after > > the release. > > You should simply use itcause it works... > > > Furthermore if you use Maven 3.2.5+ you can check the behaviour on > command line via: (You have to change the maven-artifact-VERSION.jar > accordingly to your Maven installation) this small CLI app which is > included in your maven distribution: > > ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar > 1.0.2.5-SNAPSHOT 1.0.2.6-SNAPSHOT > Display parameters as parsed by Maven (in canonical form) and comparison > result: > 1. 1.0.2.5-SNAPSHOT == 1.0.2.5-snapshot > 1.0.2.5-SNAPSHOT < 1.0.2.6-SNAPSHOT > 2. 1.0.2.6-SNAPSHOT == 1.0.2.6-snapshot > ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar > 1.0.2.5.0.0-SNAPSHOT 1.0.2.6.0.0-SNAPSHOT > Display parameters as parsed by Maven (in canonical form) and comparison > result: > 1. 1.0.2.5.0.0-SNAPSHOT == 1.0.2.5-snapshot > 1.0.2.5.0.0-SNAPSHOT < 1.0.2.6.0.0-SNAPSHOT > 2. 1.0.2.6.0.0-SNAPSHOT == 1.0.2.6-snapshot > ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar > 1.0.2.5.10.0-SNAPSHOT 1.0.2.6.0.0-SNAPSHOT > Display parameters as parsed by Maven (in canonical form) and comparison > result: > 1. 1.0.2.5.10.0-SNAPSHOT == 1.0.2.5.10-snapshot > 1.0.2.5.10.0-SNAPSHOT < 1.0.2.6.0.0-SNAPSHOT > 2. 1.0.2.6.0.0-SNAPSHOT == 1.0.2.6-snapshot > ~$ java -jar /usr/share/maven/lib/maven-artifact-3.2.5.jar > 1.0.2.5.100.0-SNAPSHOT 1.0.2.6.0.0-SNAPSHOT > Display parameters as parsed by Maven (in canonical form) and comparison > result: > 1. 1.0.2.5.100.0-SNAPSHOT == 1.0.2.5.100-snapshot > 1.0.2.5.100.0-SNAPSHOT < 1.0.2.6.0.0-SNAPSHOT > 2. 1.0.2.6.0.0-SNAPSHOT == 1.0.2.6-snapshot > > > Kind regards > Karl Heinz Marbaise > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org