The Exec Maven Plugin Documentation states for the java goal that I can provide the main class parameter like this:
mvn exec:java -Dexec.mainClass="com.my.MainClass"
However when I invoke the goal this way I always get this error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project APIEndpoint: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java are missing or invalid -> [Help 1]
The class is compiled and resides in target > classes > com > my
. What am I missing here? Do I need to add the plugin to my pom.xml
but without the configuration tags? Am I correct to assume that maven and the exec goal do all the classpath resolving automatically?