[apologies ahead of time if this double-posted. I didn't see the first one I
sent 12 hours ago]
I don’t understand the behavior of plugin executions with regard to property
resolution. I have a plugin configured like this:
<properties>
<clover.goal>setup</clover.goal>
</properties>
...
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<configuration>
<debug>true</debug>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>${clover.goal}</goal>
</goals>
</execution>
</executions>
</plugin>
If I run “mvn clean site” or most other goals, I get the following error:
[INFO] '${clover.goal}' was specified in an execution, but not found in the
plugin
If I supply a value on the command-line like “mvn clean site
–Dclover.goal=setup” I get the same error.
So it seems that it’s not resolving the property. My first question is,
should it? If not, why not?
However, if I run help:effective-pom first, it works as I want it to!
“mvn help:effective-pom clean site”
Command-line overrides to the default value of the property work as I expect
them to as well.
“mvn help:effective-pom clean site –Dclover.goal=instrument” runs the
instrument goal
Is this just an unwelcome side effect and the expected behavior is not to
resolve properties referenced by plugin goals?
Is there an alternative way to allow specification of an alternate goal for
some POMs that may inherit from this one?
Thanks
-Leon
--
View this message in context:
http://maven.40175.n5.nabble.com/Referencing-a-property-as-plugin-goal-value-tp1224124p1224124.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]