请问老师这是怎么了

请问老师这是怎么了

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.power:maven-first >------------------------
[INFO] Building maven-first 1.0.0-RELEASE
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.5.5:assembly (default-cli) > package @ maven-first >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven-first ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven-first ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
[INFO] Compiling 1 source file to D:\workspace\maven-first\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:  20.585 s
[INFO] Finished at: 2019-04-21T09:19:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project maven-first: 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

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

登陆购买课程后可参与讨论,去登陆

2回答
提问者 慕盖茨8087740 2019-04-21 16:06:35

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.power:maven-first >------------------------
[INFO] Building maven-first 1.0.0-RELEASE
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.5.5:assembly (default-cli) > package @ maven-first >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ maven-first ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven-first ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ maven-first ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ maven-first ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ maven-first ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ maven-first ---
[INFO]
[INFO] <<< maven-assembly-plugin:2.5.5:assembly (default-cli) < package @ maven-first <<<
[INFO]
[INFO]
[INFO] --- maven-assembly-plugin:2.5.5:assembly (default-cli) @ maven-first ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.531 s
[INFO] Finished at: 2019-04-21T16:04:47+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:assembly (default-cli) on project maven-first: Unable to parse configuration of mojo org.apache.maven.plugins:maven-assembly-plugin:2.5.5:assembly for parameter archive: Cannot find 'archive' in class org.apache.maven.archiver.ManifestConfiguration -> [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/PluginConfigurationException

  • 同学你好,建议同学下载老师的源码,替换一下pom文件中的内容,再打包试试。祝:学习愉快~
    2019-04-21 17:23:02
好帮手慕阿满 2019-04-21 13:45:02

同学你好,报错提示没有没有编译环境,或许是在jre而不是jdk上运行。问一下同学有按照1-2小节中的方式配置jdk吗?建议同学去检查一下环境变量的配置。

如果我的回答解决了你的疑惑,请采纳。祝:学习愉快~

  • 提问者 慕盖茨8087740 #1
    老师您好,2-2小节打包成功,还是因为环境配置问题吗?
    2019-04-21 15:52:53
  • 提问者 慕盖茨8087740 #2
    老师我什么也没改,现在重新运行一下包另一种错了 无语
    2019-04-21 16:07:16
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师