You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by docbill <do...@gmail.com> on 2012/03/08 17:11:51 UTC
Recommended way of maintaining dependant version numbers
I have a number of closely related projects which I build from a top level
pom file than in turn invokes each one of the directory builds. Originally
I did each project with a constant version number, that I manually updated.
However, I quickly found this became unmaintainable, as changes to a
dependencies often broke of fixed problems in the child projects. So I
would get a report like EMEA channel load version 2.0.1 was had error foo.
So since often someone would forget to update the child version numbers I
would then have to ask questions like what version the salesforce API was
populated in there lib directory to know exactly what code base was in use.
So, I updated the version numbers to be inherited as follows:
<RedHatSForceEnterprise.version>23.0.0</RedHatSForceEnterprise.version>
<RedHatSForceUtils.version>${RedHatSForceEnterprise.version}.2</RedHatSForceUtils.version>
<RedHatSForceAccountPurge.version>${RedHatSForceUtils.version}.4</RedHatSForceAccountPurge.version>
<RedHatSForceAspire.version>${RedHatSForceUtils.version}.1</RedHatSForceAspire.version>
<RedHatSForceTools.version>${RedHatSForceUtils.version}.3</RedHatSForceTools.version>
...
The child pom.xml files simply have version statements such as:
<version>${RedHatSForceEnterprise.version}</version>
So for example if someone reports a problem with the RedHatSForceTools
application, I know exactly what version of the of the utils, and enterprise
api being used as well.
This has worked well for me for the last 3 years, and has avoided all issues
with version numbers not being updated, and knowing exactly what versions of
dependencies are in each build.
Now here is the problem. After a recent update of maven, everytime I build
I get the following type of warning:
[INFO] [WARNING]
[INFO] [WARNING] Some problems were encountered while building the effective
model for com.redhat.sforce:RedHatSForceEnterprise:jar:23.0.0
[INFO] [WARNING] 'version' contains an expression but should be a constant.
@
com.redhat.sforce:RedHatSForceEnterprise:${RedHatSForceEnterprise.version},
/autohome/docbill/source/svn/SA4/projects/salesforce/sforce/RedHatSForceEnterprise/generate-sources.xml,
line 13, column 12
[INFO] [WARNING]
[INFO] [WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[INFO] [WARNING]
[INFO] [WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
[INFO] [WARNING]
So clearly the way I am managing the versions is no-longer valid. What is
the recommended way to do this?
Regards,
Bill
--
View this message in context: http://maven.40175.n5.nabble.com/Recommended-way-of-maintaining-dependant-version-numbers-tp5547974p5547974.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org