The import Maven project appears Solutions

error occurs when importing maven project, conducting maven clean, and maven install:

[ERROR] Failed to execute goal. Org. Apache maven. Plugins: maven — the compiler plugin: 3.1: the compile (default – the compile) on project mvc2: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[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] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

is running on a JRE rather than a JDK version.

is running on a JRE rather than a JDK version

  1. window – & gt; The preferences – & gt; Java – & gt; Installed JREs
  2. find JDK installation path

  3. select the JDK – & gt; apply
  4. maven clean again, maven install, if the problem remains, For the operation:

  5. open pom. The XML file, The following configuration under the plugins will source target to correspond to the JDK version (I was) 1.8:

set the JDK version 1.8
maven clean again, maven install, no error, can be loaded, But the project may still be small Red Cross on the top left corner, specific error is as follows:
Dynamic Web Module 3.0 requires Java 1.6 or newer.

specific solution is as follows:
find apache – maven installation path;

in Apache-maven-3.5.3 /conf/settings.xml file with the following configuration (depending on JDK version, mine is 1.8) :


re Maven > Update project can solve this problem.

this article reprinted in:

Read More: