Re: Version in one place

2013-08-20 Thread Manos Batsis
AFAIK, with xml entities not supported and mixins still unimplemented, 
your best bet is to use the release plugin to update the versions 
without going at it manually.


hth,

Manos

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Version in one place

2013-08-19 Thread Barrie Treloar
On 20 August 2013 08:17, Stephen Connolly
 wrote:
> On Monday, 19 August 2013, wrote:
>
>> Hi,
>>
>> I have 24 modules within my project. Each module reference the parent pom,
>> which defines the actual version of snapshot or deployed project.
>> As maven requires a constant for the definition of the version, 25 poms
>> must be edited just to increment the version of 0.1 point. This is very
>> boring!
>
>
> Hence use the release plugin when releasing or cutting branches... Use the
> versions plugin for more custom version number changes

Stop and think about this for a second.
How many projects are using Maven?
Do you really think that doing this manually would be considered best practice?
Tedious, automatable tasks are an itch that wont be unscratched for long.

You're best bet would be to do some reading of the freely available
books at http://maven.apache.org/articles.html

You could even have a scan of the plugins at
http://maven.apache.org/plugins/ and see if there are any descriptions
that might help.
release : Release the current project - updating the POM and tagging
in the SCM. SVN JIRA
(which as Stephen points out is the one you want)

If you just want to do some bulk editing, then
versions : Manage versions of your project, its modules, dependencies
and plugins.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Version in one place

2013-08-19 Thread Stephen Connolly
On Monday, 19 August 2013, wrote:

> Hi,
>
> I have 24 modules within my project. Each module reference the parent pom,
> which defines the actual version of snapshot or deployed project.
> As maven requires a constant for the definition of the version, 25 poms
> must be edited just to increment the version of 0.1 point. This is very
> boring!


Hence use the release plugin when releasing or cutting branches... Use the
versions plugin for more custom version number changes


>
> To overcome the issue an environment variable has been defined like:
> APP_MONTEROSA_VERSION=1.0.01.GA for instance. Changing to the Version
> 1.0.02-SNAPSHOT, now requires one change in one place!
>
> The parent pom defines the version as: 
> ${env.APP_MONTEROSA_VERSION}
>
> And all related modules define the version of the parent the same way.
>
> This works! However, as we all know maven issues a [WARNING] 'version'
> contains an expression but should be a constant.
>
> Which apparently can safely  be ignored.


Nope... Take a look at the file deployed to the repository cache... This
*will* blow up in your face.


> However I would like to know if
> an other approach exist. The "version" plug-in gives me the impression of
> an overkill, for such a simple case, hence I never tried it up to now.
>
> Instead of the environment variable, maybe a definition within a kind of
> xxx.properties could be more adequate.
>
> Every hint is welcome. Thanks in advance.
>
> Juerg H. Brandenberger
> Neunbrunnenstrasse 140
> 8050 Zürich
>
> Tel. 043 288 95 23
> Mobile: 078 740 57 69



-- 
Sent from my phone