I'd say properties should be static - otherwise predefining them using
the command line switch '-D' wouldn't work properly. BTW: With this
Maven 3 show the same behaviour like Ant (I know, I shouldn't compare
them), where properties are always immutable.
I just checked it with the the Buildnumber Plugin
(http://mojo.codehaus.org/buildnumber-maven-plugin):
<properties>
<buildNumber>predefined</buildNumber>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<executions>
<execution>
<id>initialize</id>
<goals>
<goal>create</goal>
</goals>
<phase>initialize</phase>
<configuration>
<revisionOnScmFailure>scm-revision</revisionOnScmFailure>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>echo</id>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<target>
<echo message="${buildNumber}" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
It shows exactly the same behaviour: with Maven 2 it prints
'scm-revision' and with Maven 3 it prints 'predefined'. Maybe it might
help You if You file an issue in the Jira for that component.
Maybe as a workaround You could introduce something like a
'defaultValue' for each property in Your plugin configuration(s).
Kind regards, Marc
On 27/01/11 20:55, Evgeny Goldin wrote:
But it can be perfectly changed in Maven 2 and I use it a lot. It's just that
in Maven 3 the expression doesn't reflect the change out of sudden.
-----
Best regards,
Evgeny
http://evgeny-goldin.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]