Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Overriding Plugin Configuration of POM on Command Line

$
0
0
Hi all,

is it generally possible to override the plugin configuration of the pom.xml
on the command line?
Specifically, I have configured the exec-maven-plugin to execute some class:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
...
<configuration>
<mainClass>com.someClass</mainClass>
<includePluginDependencies>true</includePluginDependencies>
</configuration>

</plugin>

However, sometimes I would like to execute some other class from the command
line:
mvn exec:java -Dexec.mainClass="com.somOtherClass"

But maven only executes the one specified in the pom.xml (com.someClass).

Is this possible?

Best,
Conny

Viewing all articles
Browse latest Browse all 5648

Trending Articles