有什么方法可以在 Netbeans 中运行 Maven 项目而不是 Maven 方式?Netbeans 自动完成,但我只想正常运行程序,作为典型的 Java 项目(以节省时间)。我希望输出看起来像这样:
run:
Hello world!
BUILD SUCCESSFUL (total time: 0 seconds)
而不是这个:
cd C:\Users\mbrnw_000\Documents\NetBeansProjects\mavenproject1; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_15" "\"C:\\Program Files\\NetBeans 7.3\\java\\maven\\bin\\mvn.bat\"" "-Dexec.args=-classpath %classpath pl.mbrnwsk.mavenproject1.App" "-Dexec.executable=C:\\Program Files\\Java\\jdk1.7.0_15\\bin\\java.exe" process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
Scanning for projects...
------------------------------------------------------------------------
Building mavenproject1 1.0-SNAPSHOT
------------------------------------------------------------------------
[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\Users\mbrnw_000\Documents\NetBeansProjects\mavenproject1\src\main\resources
[compiler:compile]
Nothing to compile - all classes are up to date
[exec:exec]
Hello world!
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 1.143s
Finished at: Fri May 03 16:27:09 CEST 2013
Final Memory: 6M/107M
------------------------------------------------------------------------