[ 
http://jira.codehaus.org/browse/MVERSIONS-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204584#action_204584
 ] 

Michael Spaulding commented on MVERSIONS-90:
--------------------------------------------

I think the complexity resolves around understanding what the "segment" 
variable means. 

if allowMinorUpdates == true, then segment = 0

This means that the first segment in the version number (major part) should 
remain unchanged, but the second segment (minor part) can be increased. 

Also, upperBound acts exclusively (not inclusive).

So, if we have allowMinorUpdates == true and an original version number of 
1.1.0, segment = 0, and upperBound = 2.0.0 (1.1.0 with segment 0 incremented), 
we'll find any new versions < 2.0.0 (e.g. 1.9.9). 

Gosh, I hope I got that all correct. :)

> update snapshots mojos parameter configuration incorrect and version 
> increment logic is wrong
> ---------------------------------------------------------------------------------------------
>
>                 Key: MVERSIONS-90
>                 URL: http://jira.codehaus.org/browse/MVERSIONS-90
>             Project: Maven 2.x Versions Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Michael Spaulding
>            Assignee: Stephen Connolly
>             Fix For: 1.2
>
>         Attachments: snapshots.patch
>
>
> The UseLatestSnapshotsMojo and UseNextSnapshotMojo have a number of problems: 
> 1. The expression values for the parameters use ${allowMajorUpdates} for all 
> three parameters instead of different property names. 
> 2. When incrementing the version segment for the upper bound, the segment is 
> incremented twice when it should only be incremented once. 
> 3. The integration test of UseLatestSnapshotsMojo is buggy and is masking the 
> errors in the code. 
> I've included a patch that does the following: 
> 1. Fixes the parameter expressions. 
> 2. Fixes the bug with the version segment. 
> 3. Corrects the unit test. Note that in order to fix the unit test, I fixed 
> the invoker properties so that the allowMinorUpdates property is set 
> properly, and I also added two new dummy projects to verify that 
> UseLatestSnapshosMojo will choose the highest version < 2.0.0. So given the 
> choice between 1.1.2-SNAPSHOT, 1.9.1-SNAPSHOT and 2.1.1-SNAPSHOT, 
> 1.9.1-SNAPSHOT should be chosen. 
> 4. I also took the liberty to do a little refactoring and moved some shared 
> code into a base class.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to