请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师求教:为什么启动maven-tomcat7插件的时候控制台会报如下错误呢,poml文件我检查了好几遍,没有什么问题,maven环境我也是用的jdk1.8的

[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building imooc-video-admin-mng 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ imooc-video-admin-mng —
[INFO] Deleting E:\javaFiles\imooc-video-admin\imooc-video-admin-mng\target
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ imooc-video-admin-mng >>>
[INFO]
[INFO] — maven-resources-plugin:2.7:resources (default-resources) @ imooc-video-admin-mng —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO]
[INFO] — maven-compiler-plugin:3.2:compile (default-compile) @ imooc-video-admin-mng —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to E:\javaFiles\imooc-video-admin\imooc-video-admin-mng\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: 1.034 s
[INFO] Finished at: 2018-12-25T13:59:26+08:00
[INFO] Final Memory: 11M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project imooc-video-admin-mng: 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]
[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

正在回答 回答被采纳积分+3

2回答

风间影月 2018-12-25 14:57:06

这个错误里有说到,你用的是jre不是jdk,一定是你配置错了噢

0 回复 有任何疑惑可以回复我~
  • 提问者 慕的地9216348 #1
    老师,我也百度过网上都说是jdk没配置好,我配置好几次,maven里还setting文件里我指定1.8jdk也没效果,求指点老师
    回复 有任何疑惑可以回复我~ 2018-12-25 19:27:21
  • 风间影月 回复 提问者 慕的地9216348 #2
    配置开发工具里的
    回复 有任何疑惑可以回复我~ 2018-12-25 19:36:28
  • 百度,eclipse配置jdk
    回复 有任何疑惑可以回复我~ 2018-12-25 19:37:36
风间影月 2018-12-25 14:07:45

开发工具没有配置jdk,配置一下吧

0 回复 有任何疑惑可以回复我~
  • 提问者 慕的地9216348 #1
    eclipse里面配置了1.8jdk
    回复 有任何疑惑可以回复我~ 2018-12-25 14:37:27
  • 提问者 慕的地9216348 #2
    也没有效果我试了好几次了
    回复 有任何疑惑可以回复我~ 2018-12-25 14:38:04
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信