mvn clean install出现问题

来源:3-11 创建项目-1

Fernwehs

2020-02-15

C:\Users\惠普\IdeaProjects\user-center>mvn clean install
[INFO] Scanning for projects…
[INFO]
[INFO] -----------------------< com.itmuch:user-center >-----------------------
[INFO] Building user-center 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — maven-clean-plugin:3.1.0:clean (default-clean) @ user-center —
[INFO] Deleting C:\Users\惠普\IdeaProjects\user-center\target
[INFO]
[INFO] — maven-resources-plugin:3.1.0:resources (default-resources) @ user-center —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:3.8.1:compile (default-compile) @ user-center —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\惠普\IdeaProjects\user-center\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: 3.667 s
[INFO] Finished at: 2020-02-15T15:24:42+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project user-center: 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

写回答

1回答

大目

2020-02-15

[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?


从异常可知,你的JDK环境变量配置有问题。这里有个图文教程,对照操作一下即可:https://blog.csdn.net/lslk9898/article/details/73836745


0
1
Fernwehs
非常感谢!
2020-02-15
共1条回复

Spring Cloud Alibaba微服务从入门到进阶

面向未来微服务:熟练掌握Spring Cloud Alibaba

3085 学习 · 1324 问题

查看课程