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!
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. 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
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!
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. 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