mvlcek wrote:
Here my proposal:
In the init-Task of the Java plugin do the following, if the
project.version is not yet set:
- get the latest version number for the current project module
(project.group/project.name) from Ivy using the uploadResolver(s) from
uploadLibs
- if no published version was found, assume 0.0.0
- if the property 'major' is set, increment the major version
number and set minor/patch to 0, similar for properties 'minor' and
'patch', otherwise if the current version is not a snapshot version,
increment the patch number and add '-SNAPSHOT' (configurable?) to the
version (this ensures that using 'latest.integration' as version in a
dependency will really get the latest version)
- set project.version to the calculated value
This should be quite easy to implement (if you know the Ivy-API)
and would implement a default behavior which can easily be ignored (by
setting the project.version manually).
In any case, a method String Project.getLatestUploadedVersion()
would definitely be very appreciated.
Comments? Ideas to make it even more general?
I think this is a good idea.
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
|