You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Leon Franzen <le...@tvworks.com> on 2010/07/16 17:38:34 UTC

Referencing a property as plugin goal value

[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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Referencing a property as plugin goal value

Posted by Leon Franzen <le...@tvworks.com>.
This works fine in Maven 3.0-beta-1.  I guess that's one more reason to
upgrade.
-- 
View this message in context: http://maven.40175.n5.nabble.com/Referencing-a-property-as-plugin-goal-value-tp1224124p1441330.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org