maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Version in one place
Date Mon, 19 Aug 2013 22:47:22 GMT
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: <version>
> ${env.APP_MONTEROSA_VERSION}</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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message