Maven编译器插件错误v3.0.3

时间:2015-09-11 12:12:09

标签: java maven maven-plugin

我是maven装置的新手。在执行安装maven的.bat文件时,我收到以下错误。请你检查一下:

     Launching environment tests
     checking Java 4 compile, java 4 run
     [ERROR] COMPILATION ERROR :
     [ERROR] Failure executing javac,  but could not parse the error:
     The system cannot find the path specified.

     [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default
     -compile) on project devenv-validate: Compilation failure
     [ERROR] Failure executing javac,  but could not parse the error:
     [ERROR] The system cannot find the path specified.
     [ERROR] -> [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 arti
     cles:
     [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
     checking Java 4 compile, java 6 run
     [ERROR] COMPILATION ERROR :
     [ERROR] Failure executing javac,  but could not parse the error:
     The system cannot find the path specified.

     [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default
     -compile) on project devenv-validate: Compilation failure
     [ERROR] Failure executing javac,  but could not parse the error:
     [ERROR] The system cannot find the path specified.
     [ERROR] -> [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 arti
     cles:
     [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
     checking Java 6 compile, java 6 run

     -------------------------------------------------------
      T E S T S
     -------------------------------------------------------
     Running TestDevEnvValidator
     Java version  : Actual [1.6.0_20], expected [1.6.0_20]
     Java compiler : Actual [6], expected [6]
     Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

     Results :

     Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

     Press any key to continue . . .

任何人都可以看一看并说出它失败的原因。提前谢谢。

1 个答案:

答案 0 :(得分:1)

  

系统找不到指定的路径。

如果您使用的是Windows,请检查是否为系统变量指定了路径:Path,JAVA_HOME,M2_HOME,M2。

查看此tutorial

http://www.tutorialspoint.com/maven/maven_environment_setup.htm