You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by stug23 <pa...@gmail.com> on 2012/01/10 17:11:33 UTC

Warning when using expression for version in pom.xml

I am investigating the use of an expression for the value of the version in
the  pom.xml. There are properties that fully specify the actual value of
the version in the same pom.xml, so I'm not sure why the warning is issued.
The expression is correctly evaluated (i.e., value = 1.2.0-67936). The
purpose of the expression is to help support continuous delivery - see the
following link for more details on this approach:

https://groups.google.com/d/msg/continuousdelivery/hdlALMDuiyU/brtjqCqyFd4J

So my question is: "Will this warning turn into a fatal build error in the
future?"

*warning message
*
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model
for com.foo.library:continuous-delivery:jar:1.2.0-67936
[WARNING] 'version' contains an expression but should be a constant. @
com.foo.library:continuous-delivery:${main.version}-${build.number},
/export/home/patp/CONTINUOUS_DELIVERY/VERSION/continuous-delivery/pom.xml,
line 13, column 11
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.

*relevant bits from pom.xml*

/Note that SNAP is default value for svn.revision; alternate value comes
from svn revision number as -Dsvn.revision=67936 in the example:/

<groupId>com.foo.library</groupId>
<artifactId>continuous-delivery</artifactId>
<version>${main.version}-${build.number}</version>
. . .
<properties>
	<svn.revision>SNAP</svn.revision>
	<build.number>${svn.revision}</build.number>
	<main.version>1.2.0</main.version>
</properties>

--
View this message in context: http://maven.40175.n5.nabble.com/Warning-when-using-expression-for-version-in-pom-xml-tp5134463p5134463.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


Re: Warning when using expression for version in pom.xml

Posted by stug23 <pa...@gmail.com>.
I got at least one feedback on this question over in the Google Group for
Continuous Delivery:

https://groups.google.com/d/msg/continuousdelivery/hdlALMDuiyU/jLMBYTbJ0MEJ

Anyone here have opinions or experience with this question?

Thanks.

--
View this message in context: http://maven.40175.n5.nabble.com/Warning-when-using-expression-for-version-in-pom-xml-tp5134463p5140277.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