Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven MojoExecutionException

I am facing this issue , when i am deploying my application using Maven, please suggest some solution.

Error log,

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.790s
[INFO] Finished at: Wed Apr 23 10:44:13 IST 2014
[INFO] Final Memory: 54M/131M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project clustering.services: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre7\..\lib\tools.jar -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :clustering.services

Thanks in advance.

like image 222
astack Avatar asked Apr 23 '14 05:04

astack


People also ask

What is MojoExecutionException?

Class MojoExecutionExceptionAn exception occurring during the execution of a plugin. Throwing this exception causes a "BUILD ERROR" message to be displayed.

What does Mvn generate sources do?

The “maven-source” plugin is used to pack your source code and deploy along with your project. This is extremely useful, for developers who use your deployed project and also want to attach your source code for debugging.


1 Answers

set JAVA_HOME to jdk not to JDK_DIR/jre, See this question for how to set the value

like image 182
jmj Avatar answered Oct 08 '22 22:10

jmj