How to use alternative version numbering scheme

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use alternative version numbering scheme

Ed Hillmann-2
Hi all.  I'm in the middle of writing a new software application (using
Maven), which will eventually be released with some existing software
packages (that don't use Maven).  Since I've started, I've use the standard
version numbering scheme for my applicaiton (at the moment, it's
1.00-SNAPSHOT).  However, as it's going to be released with an existing
package, I need to get the new app's version number to be the same as the
other components.

The existing version number rule uses a four-part number: <Major
Version>.<Minor Version>.<Release Number>.<Build Number>
An example, 6.01.11.01, or 5.01.00.00

So, this won't work in the default Maven numbering scheme for versions.
 I've come across the Versions Maven Plugin, and it indicates that a project
can define taht certain artifacts can use alternative numbering
schemes<http://mojo.codehaus.org/versions-maven-plugin/version-rules.html>.
This sounds like what I want to do: for my specific artifacts, use a
numbering scheme that includes an extra number before expecting the
qualifier.

This page mentions the mercury scheme, and a numeric scheme.  But I'm having
trouble finding any doco that states what those schemes are.  Does anyone
know where this is?

If these don't match, is it easy to provide our own scheme?  We just want
the same scheme, but with a fourth number. :)

Thanks for any help,
Ed
Reply | Threaded
Open this post in threaded view
|

Re: How to use alternative version numbering scheme

Wendy Smoak
On Tue, Aug 18, 2009 at 7:46 PM, Ed Hillmann<[hidden email]> wrote:
> The existing version number rule uses a four-part number: <Major
> Version>.<Minor Version>.<Release Number>.<Build Number>
> An example, 6.01.11.01, or 5.01.00.00
>
> So, this won't work in the default Maven numbering scheme for versions.

Have you tried it?  We use a four part version for the .NET projects
at work built with Maven, and I haven't seen any problems...

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to use alternative version numbering scheme

Ed Hillmann-2
On Wed, Aug 19, 2009 at 12:58 PM, Wendy Smoak <[hidden email]> wrote:

>
> Have you tried it?  We use a four part version for the .NET projects
> at work built with Maven, and I haven't seen any problems...
>
> --
> Wendy
>
>
Yes, when all else fails, have a play.

I started using the standard logic with four-part version numbers, and it
seems pretty happy.

I've only testing the release plugin, so I haven't tried any version
boundaries.  But that's not really an issue for me.

So, I think I worried a bit over nothing. :)

Thanks,
Ed
Reply | Threaded
Open this post in threaded view
|

Re: How to use alternative version numbering scheme

stephenconnolly
In reply to this post by Ed Hillmann-2
2009/8/19 Ed Hillmann <[hidden email]>:

> Hi all.  I'm in the middle of writing a new software application (using
> Maven), which will eventually be released with some existing software
> packages (that don't use Maven).  Since I've started, I've use the standard
> version numbering scheme for my applicaiton (at the moment, it's
> 1.00-SNAPSHOT).  However, as it's going to be released with an existing
> package, I need to get the new app's version number to be the same as the
> other components.
>
> The existing version number rule uses a four-part number: <Major
> Version>.<Minor Version>.<Release Number>.<Build Number>
> An example, 6.01.11.01, or 5.01.00.00
>
> So, this won't work in the default Maven numbering scheme for versions.
>  I've come across the Versions Maven Plugin, and it indicates that a project
> can define taht certain artifacts can use alternative numbering
> schemes<http://mojo.codehaus.org/versions-maven-plugin/version-rules.html>.
> This sounds like what I want to do: for my specific artifacts, use a
> numbering scheme that includes an extra number before expecting the
> qualifier.
>
> This page mentions the mercury scheme, and a numeric scheme.  But I'm having
> trouble finding any doco that states what those schemes are.  Does anyone
> know where this is?
>
> If these don't match, is it easy to provide our own scheme?  We just want
> the same scheme, but with a fourth number. :)
>

The numbering scheme is only really important if you are using version ranges...

If you are using version ranges, you really have to use Maven's
scheme, or else ensure that String sorting works for your ranges.

The versions-maven-plugin needs to know version numbering rules in
order to decide whether versionA > versionB so it can tell you if
there are newer versions available.

The "mercury" and "numeric" schemes are both unbounded schemes, i.e.
they can take as many digits as you can type... it is unlikely that
you would want anything else.

The main difference is between the two is that "mercury" has 'special'
qualifiers and treats -'s as a lesser .  while "numeric" only compares
up to the first - as numbers, everything after the - is a qualifier
(unless it is a number) and qualifiers are compared as strings.

-Stephen

> Thanks for any help,
> Ed
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to use alternative version numbering scheme

Ed Hillmann-2
On Wed, Aug 19, 2009 at 3:55 PM, Stephen Connolly <
[hidden email]> wrote:

>
> The numbering scheme is only really important if you are using version
> ranges...
>
> If you are using version ranges, you really have to use Maven's
> scheme, or else ensure that String sorting works for your ranges.
>
> The versions-maven-plugin needs to know version numbering rules in
> order to decide whether versionA > versionB so it can tell you if
> there are newer versions available.
>
> The "mercury" and "numeric" schemes are both unbounded schemes, i.e.
> they can take as many digits as you can type... it is unlikely that
> you would want anything else.
>
> The main difference is between the two is that "mercury" has 'special'
> qualifiers and treats -'s as a lesser .  while "numeric" only compares
> up to the first - as numbers, everything after the - is a qualifier
> (unless it is a number) and qualifiers are compared as strings.
>
> -Stephen
>
>
Thanks for the clarification.  In the short term, I don't think we'll need
version range support for these artifacts (we're not expecting anything to
be using them in their POM file).  However, it's good to know that we can
shift to something like numeric if in the future something depends on these
artifact with the 4-digit version number.

Thanks again,
Ed
Reply | Threaded
Open this post in threaded view
|

Re: How to use alternative version numbering scheme

stephenconnolly
mercury is the one you're after.  Maven 3 will use Mercury

2009/8/19 Ed Hillmann <[hidden email]>:

> On Wed, Aug 19, 2009 at 3:55 PM, Stephen Connolly <
> [hidden email]> wrote:
>
>>
>> The numbering scheme is only really important if you are using version
>> ranges...
>>
>> If you are using version ranges, you really have to use Maven's
>> scheme, or else ensure that String sorting works for your ranges.
>>
>> The versions-maven-plugin needs to know version numbering rules in
>> order to decide whether versionA > versionB so it can tell you if
>> there are newer versions available.
>>
>> The "mercury" and "numeric" schemes are both unbounded schemes, i.e.
>> they can take as many digits as you can type... it is unlikely that
>> you would want anything else.
>>
>> The main difference is between the two is that "mercury" has 'special'
>> qualifiers and treats -'s as a lesser .  while "numeric" only compares
>> up to the first - as numbers, everything after the - is a qualifier
>> (unless it is a number) and qualifiers are compared as strings.
>>
>> -Stephen
>>
>>
> Thanks for the clarification.  In the short term, I don't think we'll need
> version range support for these artifacts (we're not expecting anything to
> be using them in their POM file).  However, it's good to know that we can
> shift to something like numeric if in the future something depends on these
> artifact with the 4-digit version number.
>
> Thanks again,
> Ed
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]