How do I run a specific goal with a particular configuration in a Maven plugin when I have several configurations for that goal

Execution of multiple goals from the CLI is now supported in Maven 3.3.1+

mvn exec:java@first-cli
mvn exec:java@second-cli

Where first-cli/second-cli are the execution ids.

https://blog.soebes.de/blog/2015/03/17/apache-maven-3-dot-3-1-features/

For your example the commands would be

mvn myplugin:mygoal@process-cats
mvn myplugin:mygoal@process-dogs

Leave a Comment