简体   繁体   中英

Failed to execute goal org.codehaus.mojo

I created a maven project using Netbeans , and getting below error while running the application.

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project spring_l1: 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: http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Most likely you just need to scroll up from that error.

I just put something in a java file so it wouldn't compile and then tried to run it and got this:

--- 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

The entire error you pasted is really generic and will get printed for almost any error. But if you scrolled up you can see that in my case I have a BUILD FAILURE. To see what the error was in my case, I would rebuild (Shift F11). This is probably a good idea often when there are run errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM