Maven maven-exec-plugin multiple execution configurations -
Is it possible to implement a maven-exec-plugin (or any other plugin) execution by its ID from the command line?
Let's assume my pom.xml file looks like this:
& lt; Project & gt; [...] & lt; Plugin & gt; & Lt; Group & gt; Org.codehaus.mojo & lt; / Group & gt; & Lt; ArtifactId & gt; Executive-Maven-plugin & lt; / ArtifactId> & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Foo & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Executive & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Step & gt; & Lt; / Step & gt; & Lt; Configuration & gt; & Lt; Execution & gt; Echo & lt; / Execution & gt; & Lt; Logic & gt; & Lt; Logic & gt; Foo & lt; / Logic & gt; & Lt; / Logic & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; Execution & gt; & Lt; ID & gt; Bar & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Executive & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Step & gt; & Lt; / Step & gt; & Lt; Configuration & gt; & Lt; Execution & gt; Echo & lt; / Execution & gt; & Lt; Logic & gt; & Lt; Logic & gt; Bar & lt; / Logic & gt; & Lt; / Logic & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; [...] & lt; / Project & gt;
Now it is possible to call
mvn exec: exec
with some added magic to run the execution "Foo"?
No, it is not possible. Executives are binding on the lifecycle (i.e. they are not designed to be applied to the command line). You will need to use the profile move described in that link which you provided.
Comments
Post a Comment