Hi,
I want to compile and deploy release artifacts on daily basis to my Maven
repository, each version different from the other; Ideally I want to setup a
property to do this but Maven complains very strongly about it:
Macintosh:walker josevnz$ mvn package -Dwalker.version=20120115
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
com.stupidzombie:walker:jar:20120115
[WARNING] 'version' contains an expression but should be a constant. @
com.stupidzombie:walker:${walker.version},
/Users/josevnz/Documents/stupidzombie/kenai/stupidzombie~source-code-repository/branches/walker/pom.xml,
line 6, column 12
[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.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building walker 20120115
[INFO] ------------------------------------------------------------------------
[INFO]
So it seems that I cannot use a variable on the <version> tag in my pom. What
is the right way to do this?:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stupidzombie</groupId>
<artifactId>walker</artifactId>
<version>${walker.version}</version>
<packaging>jar</packaging>
<name>walker</name>
<url>http://stupidzombie.com</url>
Thanks in advance,
--Jose
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]