tags:

views:

26

answers:

2

I have a maven pom.xml file with multiple instances of a same goal defined (inside <execution> with different <id>s).

I'm wondering how I can run a specific goal via maven command line. I've tried mvn --help, but I couldn't find an entry regarding this.

+1  A: 

Answering my own question is always fun, especially the answer is "no, you can't do it."

After many Google searches, I've encountered the following article:

http://docs.codehaus.org/display/MAVENUSER/Default+Plugin+Execution+IDs

There is no way to separate configurations for command line executions of different goals in the same plugin.
Currently, the main plugin configuration section can be used to define settings to be used when executing a plugin from the command line. Unfortunately, these settings are applied to all executions of the plugin.

Jeeyoung Kim
Of course, if anyone want to prove me wrong, please do so, because it will really help me if this feature is present.
Jeeyoung Kim
A: 

Having read your own answer, I'm not sure I understood the question :) But it sounds like this previous question and answer.

Pascal Thivent