[
https://jira.codehaus.org/browse/MVERSIONS-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=291015#comment-291015
]
Pete Cornish commented on MVERSIONS-176:
----------------------------------------
Hi Stephen,
Firstly, thanks for your comments. I'll address your second comment first - the
example was butchered from a working example I have in one of my projects. I
confess that I don't exactly understand your query, but would it make a
difference if I told you that there is also a {{phase}} element in the
execution configuration where I have it working right now?
On your suggestion of a separate mojo - I agree with you and suspected you
might feel this way from the perspective of simplicity. I'll re-work the code
into a separate mojo and submit the patch. Does that sound okay?
All the best,
Pete
> 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