无法执行目标org.codehaus.mojo

时间:2015-08-17 16:36:52

标签: java maven netbeans

我使用Netbeans创建了一个maven项目,并在运行应用程序时遇到错误。

  

无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec   项目spring_l1上的(default-cli):命令执行失败。处理   退出时出错:1(退出值:1) - > [帮助1]

要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。 使用-X开关重新运行Maven以启用完整的调试日志记录。

有关错误和可能的解决方案的更多信息,请阅读以下文章: http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

1 个答案:

答案 0 :(得分:0)

您很可能只需要从该错误向上滚动。

我只是把一些东西放在一个java文件中,所以它不会编译然后尝试运行它并得到它:

--- exec-maven-plugin:1.2.1:exec (default-cli) @ mavenproject3 ---
Error: Could not find or load main class wshackle.mavenproject3.Test1
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.122s
Finished at: Tue Aug 18 21:36:33 EDT 2015
Final Memory: 5M/78M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mavenproject3: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

您粘贴的整个错误非常通用,几乎可以打印任何错误。但是,如果你向上滚动,你可以看到,在我的情况下,我有一个 建立失败。要查看我的错误是什么,我会重建(Shift F11)。当出现运行错误时,这通常是一个好主意。

相关问题