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 <gei...@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
>

Reply via email to