[ 
https://jira.codehaus.org/browse/MVERSIONS-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290852#comment-290852
 ] 

Stephen Connolly commented on MVERSIONS-176:
--------------------------------------------

I do not like the idea of overloading the set mojo.

I would prefer to see a separate increment or inc mojo.

It is easier for users to understand why things work the way they work if we 
keep each mojo doing a single function.

Consider the case where you move to a new project, now you don't know whether 
that project has the "magic" property turned on or not, and the mojo starts 
behaving differently.

A separate mojo goal makes far more sense.
                
> Auto-increment POM versions in the 'set' goal
> ---------------------------------------------
>
>                 Key: MVERSIONS-176
>                 URL: https://jira.codehaus.org/browse/MVERSIONS-176
>             Project: Maven 2.x Versions Plugin
>          Issue Type: Improvement
>            Reporter: Pete Cornish
>            Priority: Minor
>         Attachments: autoincrement-versions-maven-plugin-patch.txt
>
>
> h3. Summary
> The 'set' goal can automatically increment the old version number it finds in 
> a POM, rather than depending on the external fixed property 'newVersion'.
> _Patch attached:_ [^autoincrement-versions-maven-plugin-patch.txt]
> h3. Use case
> In a multi-module project, I have a number of child projects for which I 
> would like to increment the version number. The version numbers of the child 
> projects are not the same, so a single static 'newVersion' won't do.
> Functionally-speaking, this is a variant of the standard use case for the 
> 'set' goal, however, the 'newVersion' property does not have to be specified, 
> and the plugin attempts to automatically increment the 'oldVersion' found in 
> a POM it is going to change.
> I set the configuration property 'autoIncrementVersion' to enable this 
> behaviour, which is disabled by default.
> h3. Implementation
> I have relied on existing Maven project functionality (notably the 
> *maven-release-manager*, also used by the *maven-release-plugin*) to perform 
> the version increment functionality. A dependency on the 
> *maven-release-manager* has been added to the *versions-maven-plugin* POM, 
> and the code changes are localised to the 
> {{org.codehaus.mojo.versions.SetMojo}} class.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.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