[
https://jira.codehaus.org/browse/MVERSIONS-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pete Cornish updated MVERSIONS-176:
-----------------------------------
Attachment: autoincrement-versions-maven-plugin-patch-2.txt
h4. Updated implementation
OK, I have split the increment functionality into a new {{IncrementMojo}}.
Since it shares a lot with the {{SetMojo}}, they both now extend a base class
containing the common functionality.
See [^autoincrement-versions-maven-plugin-patch-2.txt]
Set should be functionally identical to how it is in trunk now.
@Stephen - Does this look more sensible?
h4. Example
You can now run the goal with:
{noformat}
mvn versions:increment
{noformat}
> 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-2.txt,
> 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