Can I call the execution of the maven-exec-plugin (or any other plugin) with my identifier from the command line?
Let's say the pom.xml file looks like this:
<project> [...] <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> <execution> <id>foo</id> <goals> <goal>exec</goal> </goals> <phase></phase> <configuration> <executable>echo</executable> <arguments> <argument>foo</argument> </arguments> </configuration> </execution> <execution> <id>bar</id> <goals> <goal>exec</goal> </goals> <phase></phase> <configuration> <executable>echo</executable> <arguments> <argument>bar</argument> </arguments> </configuration> </execution> </executions> </plugin> [...] </project>
Now you can call
mvn exec: exec
with added magic to run "foo" execution?
For the curious, there is an alternative solution using the profiles available here: http://www.mail-archive.com/user@mojo.codehaus.org/msg00151.html
maven maven-2
Maciej Biłas Feb 03 '10 at 14:37 2010-02-03 14:37
source share