Run Netbeans maven project from command-line?
问题 I've got a Maven project that runs perfectly inside Netbeans. How can I execute the application from the command-line (without Netbeans)? 回答1: There's a plugin for that: http://www.mojohaus.org/exec-maven-plugin/ $ mvn exec:java -Dexec.mainClass="com.mycompany.App" Assuming com.mycompany.App is you main class. 回答2: Using the Maven Exec Plugin and its exec:java goal as suggested is a first option. And the command suggested is correct, you have to specify -Dexec.mainClass=VALUE on the command