Resolve failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (Default-compile) on project Methods of autotest_fchtgl:compilation failure

Source: Internet
Author: User
Tags stack trace

Found an error while encountering maven install

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (Default-compile) on project Autotest_fchtgl:compilation failure
[ERROR] No compiler is provided in this environment. Perhaps are running ona JRE rather than a JDK?
[ERROR], [Help 1]
[ERROR]
[ERROR] The full stack trace of the errors, re-run Maven with The-eswitch.
[ERROR] Re-run Maven using The-x switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, pleaseread the following articles:
[ERROR] [Help 1]http://cwiki.apache.org/confluence/display/maven/mojofailureexception

Analysis:

In fact, the error has been stated very clearly, see the first last perhaps you is running on a JRE rather than a JDK?

This means that you may be compiling on a JRE instead of a JDK, and maven compiling is for JDK, perhaps your compiler has configured a JRE path.

Solve:

In Eclipse, choose window→preference→java→installed jres Add your JDK path, select the JDK instead of the JRE, and the reason for the error is here.

Then right-click on your MAVEN project, tap Update Project in Maven, and then maven Clean,install a bit.

Resolve failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (Default-compile) on project Autotest_fchtgl:compilation method of Failure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.