Run the Java main method in the Maven project Copy the code code as follows: mvn compile mvn exec:java -Dexec.mainClass="com.vineetmanohar.module.Main" mvn exec:java -Dexec.mainClass="com.vineetmanohar.module.Main" -Dexec.args="arg0 arg1 arg2"