The error is as follows in the packaging process:
No compiler is provided in this environment. Perhaps running on a JRE rather than a JDK
[INFO] Scanning for projects ... [INFO] [INFO] Using the builder Org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread Count of 1[info] [INFO]-------------------------- ----------------------------------------------[INFO] Building firstspringbootexample 0.0.1-snapshot[info]-------- ----------------------------------------------------------------[INFO] [INFO]---maven-clean-plugin:2.6.1:clean ( Default-clean) @ firstspringbootexample---[info] Deleting d:\workspace2\firstspringbootexample\target[info] [INFO]- --Maven-resources-plugin:2.6:resources (default-resources) @ firstspringbootexample---[INFO] Using ' UTF-8 ' encoding To copy filtered resources. [INFO] Copying 0 Resource[info] Copying 0 Resource[info] [INFO]---maven-compiler-plugin:3.1:compile (default-compile) @ firsts Pringbootexample---[INFO] changes detected-recompiling the module! [INFO] Compiling 1 source file to D:\workspace2\firstspringbootexample\target\classes[info]----------------------------------------------------- --------[ERROR] Compilation error: [INFO]-------------------------------------------------------------[ERROR] No Compiler is provided in this environment. Perhaps is running on a JRE rather than a JDK? [INFO] 1 Error[info]-------------------------------------------------------------[INFO]------------------------- -----------------------------------------------[INFO] BUILD Failure[info]--------------------------------------- ---------------------------------[INFO] Total time:2.398 s[info] finished At:2017-10-01t17:41:26+08:00[info] Final Memory:13m/232m[info]------------------------------------------------------------------------[ERROR] Failed to Execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (Default-compile) on project Firstspringbootexample:compilation Failure[error] No compiler is provided in this environment. Perhaps you is running on A JRE rather than a JDK? [ERROR], [Help 1][error] [ERROR]-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 on the errors and possible solutions, please read the following articles:[error] [Help 1] http://c Wiki.apache.org/confluence/display/maven/mojofailureexception
View Code
Cause of the problem:
Running the project on the IDE is the JRE used, but the MAVEN packaging project requires the use of the JDK
Problem solving:
Window--->preferences--->java--->installed jres---->add a JDK came in
Then, in the process of packaging: Apply the JDK to MAVEN package.
For more details, please refer to the packing process: http://www.cnblogs.com/sxdcgaq8080/p/7617547.html
"Maven" MAVEN Web Project Package error: No compiler is provided in this environment. Perhaps running on a JRE rather than a JDK