if you think about this a bit more you will realise that what you are asking
for does not make sense (unless you are trying to configure the plugin that
you are executing.

if you specify a plugin:mojo, then only that plugin:mojo will get executed.
Adding other executions of other plugins to a profile and activating that
profile will have ZERO effect on what happens, as only the plugin:mojo that
you specified will be executed.

try telling us a bit more about what your problem is and perhaps somebody
can point you towards a solution.... but it sounds like you really want
maven to be more like ant... maven is not ant, if you want ant use ant ;-)

-Stephen

2009/8/5 Dominic Mitchell <d...@semantico.com>

> Hi all,
>
> I'm wondering — is there a way to activate a profile based on the plugin
> specified on the command line?
>
> The reason for this is that I'm working with a cocoon project.  Normally,
> the cocoon plugin gets bound to compile:
>
>      <plugin>
>        <groupId>org.apache.cocoon</groupId>
>        <artifactId>cocoon-maven-plugin</artifactId>
>        <version>1.0.0-M2</version>
>        <executions>
>          <execution>
>            <id>prepare</id>
>            <phase>compile</phase>
>            <goals>
>              <goal>prepare</goal>
>            </goals>
>          </execution>
>        </executions>
>        <configuration>
>          <customLog4jXconf>etc/log4j.xml</customLog4jXconf>
>        </configuration>
>      </plugin>
>
> However, I only really care that this happens when I invoke mvn jetty:run
> on the command line.  Otherwise, it's just wasted effort.  I was thinking
> that I could make this into a profile, but I'm not sure how.  Or if that's
> even possible.
>
> Thanks,
> -Dom

Reply via email to