maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Setting properties in pom.xml from command line
Date Fri, 15 Apr 2011 09:16:58 GMT
Yes, it is. "-Dmygroup-myartifact.version=xxx"

However, for your example it would be a very bad thing as your pom will not
be consumable by any client.

/Anders

On Fri, Apr 15, 2011 at 10:37, Geir Gullestad Pettersen <geirgp@gmail.com>wrote:

> Hi,
>
> Is it possible to inject properties into pom.xml from the command line at
> runtime?
>
> consider this dependency:
>
>    <dependencies>
>        <dependency>
>            <groupId>mygroup</groupId>
>            <artifactId>myartifact</artifactId>
>            <version>${mygroup-myartifact.version}</version>
>            <type>war</type>
>        </dependency>
>    </dependencies>
>
> ${mygroup-myartifact.version} can of course be set in the <properties> tag,
> but I need to be able to change the version number without changing
> pom.xml.
> This should peferrably be done from command line - is there a way to set
> properties from commandline?
>
> Thanks,
> Geir
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message