here is why this is a bad plan.
the pom that gets deployed will not have the property value resolved, so
anyone depending on that pom will pick up the dependency as being the
string uninterpolated with the ${ } and much hilarity will ensue in your
build process.
in maven 2.1.0 and/or 2.2.0 an attempt was made to deploy poms with
resolved properties... this broke more than expected, which is why those
two versions are not recommended, 2.2.1 being the recommended 2.x version.
best bet would be
mvn versions:set && mvn deploy versions:rollback
- Stephen
---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 15 Jan 2012 15:31, "Jose Vicente Nunez Zuleta" <[email protected]>
wrote:
> 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]
>
>