Hi,
I see a different behavior in Maven 2.2.1 and Maven 3.0.2.
Suppose I have
<properties>
<propertyDir>dir</propertyDir>
</properties>
Later, it is used in expression to configure some plugin:
<configuration>
<targetPath>pl-290-4/${propertyDir}/1</targetPath>
...
</configuration>
*Before* this configuration is running, yet another plugin overrides
${propertyDir}
to another value by calling
mavenProject.getProperties().setProperty( "propertyDir", "dirdir" )
Now, in Maven 2 <configuration> above will see new value and resolve to "
pl-290-4/*dirdir*/1" but in Maven 3
it will see an old one and resolve to "pl-290-4/*dir*/1". As if Maven 2
interpolates ${propertyDir} dynamically
but Maven 3 does so statically so even having ${propertyDir} updated at
run-time the value of expression where
it is involved stays the same.
Here is the POM <http://goo.gl/K3rkS> and if I uncomment line
29<http://goo.gl/JYcsX> expression
in line 143 <http://goo.gl/HEKzq> will create a directory that will fail an
assert in
line 195 <http://goo.gl/YExqW> in Maven 3.0.2 but not in Maven 2.2.1. The
value is overridden in line 62 <http://goo.gl/0wFZs>.
What do you say the correct behavior is? Is it Maven 3 bug or feature?
Appreciate your help!
Best regards,
Evgeny
evgeny-goldin.com