在Netbeans中运行Maven项目



是否有任何方法可以在Netbeans中运行Maven项目而不是以Maven的方式?Netbeans自动完成,但我只是想正常运行程序,作为一个典型的Java项目(节省时间)。我希望输出看起来像这样:

run:
Hello world!
BUILD SUCCESSFUL (total time: 0 seconds)

而不是:

cd C:Usersmbrnw_000DocumentsNetBeansProjectsmavenproject1; "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:Usersmbrnw_000DocumentsNetBeansProjectsmavenproject1srcmainresources
[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
------------------------------------------------------------------------

在项目属性中打开Compile on Save。但是请注意,在7.4(即将到来的版本)中,所有的执行都将由Maven单独完成。

相关内容

  • 没有找到相关文章

最新更新