Closed ankit45621 closed 5 years ago
While running mvn clean install, I am getting this error
set JAVA_HOME to jdk not to JDK_DIR/jre, See this question for how to set the value. Also remove your old .m2 packages, and try to use mvn clean and mvn install. That will resolve your issue.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
D:\projects\Angular2-SpringBoot-Example\server>mvn clean install [INFO] Scanning for projects... [INFO] [INFO] -----------------------< net.mzouabi.ng2:server >----------------------- [INFO] Building server 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ server --- [INFO] Deleting D:\projects\Angular2-SpringBoot-Example\server\target [INFO] [INFO] --- maven-processor-plugin:2.2.4:process (querydslmetamodel) @ server --- [ERROR] JVM is not suitable for processing annotation! ToolProvider.getSystemJavaCompiler() is null. [INFO] [INFO] --- maven-processor-plugin:2.2.4:process (mapstruct) @ server --- [ERROR] JVM is not suitable for processing annotation! ToolProvider.getSystemJavaCompiler() is null. [INFO] [INFO] --- build-helper-maven-plugin:1.10:add-source (add-source) @ server --- [INFO] Source directory: D:\projects\Angular2-SpringBoot-Example\server\target\generated-sources\java added. [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ server --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ server --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 12 source files to D:\projects\Angular2-SpringBoot-Example\server\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.674 s [INFO] Finished at: 2018-07-06T12:42:43+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project server: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] [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 articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
D:\projects\Angular2-SpringBoot-Example\server>mvn clean install [INFO] Scanning for projects... [INFO] [INFO] -----------------------< net.mzouabi.ng2:server >----------------------- [INFO] Building server 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ server --- [INFO] Deleting D:\projects\Angular2-SpringBoot-Example\server\target [INFO] [INFO] --- maven-processor-plugin:2.2.4:process (querydslmetamodel) @ server --- [ERROR] JVM is not suitable for processing annotation! ToolProvider.getSystemJavaCompiler() is null. [INFO] [INFO] --- maven-processor-plugin:2.2.4:process (mapstruct) @ server --- [ERROR] JVM is not suitable for processing annotation! ToolProvider.getSystemJavaCompiler() is null. [INFO] [INFO] --- build-helper-maven-plugin:1.10:add-source (add-source) @ server --- [INFO] Source directory: D:\projects\Angular2-SpringBoot-Example\server\target\generated-sources\java added. [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ server --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ server --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 12 source files to D:\projects\Angular2-SpringBoot-Example\server\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.092 s [INFO] Finished at: 2018-07-06T12:44:06+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project server: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] [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 articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
D:\projects\Angular2-SpringBoot-Example\server>