[
http://jira.codehaus.org/browse/MENFORCER-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146876#action_146876
]
brianfox edited comment on MENFORCER-50 at 9/3/08 2:53 PM:
------------------------------------------------------------
There are a few problems with this. First is i'm using the core maven code to
do this, and:
{noformat}
else if ( qualifier.length() <
otherVersion.qualifier.length() &&
otherVersion.qualifier.startsWith( qualifier ) )
{
// here, the longer one that otherwise match is
considered older
result = 1;
}
{noformat}
The code is explicitly saying that M1-RC12 is older than M1. I'm not about to
start monkeying with this code as it will blow up everyone.
If we continue with the RCs, we will eventually have an official M1, which will
be newer than the RCs, surely you wouldn't then want the range to include the
RCs.
Since if the length is the same, it comes down to natural string ordering of
the qualifier, you should use [2.1.0-M1-RC00,) to get your desired results
was (Author: brianfox):
There are a few problems with this. First is i'm using the core maven code
to do this, and:
else if ( qualifier.length() <
otherVersion.qualifier.length() &&
otherVersion.qualifier.startsWith( qualifier ) )
{
// here, the longer one that otherwise match is
considered older
result = 1;
}
The code is explicitly saying that M1-RC12 is older than M1. I'm not about to
start monkeying with this code as it will blow up everyone.
If we continue with the RCs, we will eventually have an official M1, which will
be newer than the RCs, surely you wouldn't then want the range to include the
RCs.
Since if the length is the same, it comes down to natural string ordering of
the qualifier, you should use [2.1.0-M1-RC00,) to get your desired results
> Version rule with dashes are not inspected correctly
> ----------------------------------------------------
>
> Key: MENFORCER-50
> URL: http://jira.codehaus.org/browse/MENFORCER-50
> Project: Maven 2.x Enforcer Plugin
> Issue Type: Bug
> Components: Standard Rules
> Affects Versions: 1.0-alpha-3
> Reporter: Paul Benedict
> Assignee: Brian Fox
>
> I know it's possible to say [2.0,) for anything within the 2.0 series.
> The same was not possible with the latest Maven 2.1 release:
> [2.1.0-M1,) does not pass for version 2.1.0-M1-RC12
> I should be accepting anything within the M1 build range.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira