求助!项目使用spring boot APP正常运行,尝试着打包maven install爆出如下错误:
我在使用ssm(非Spring boot)能够正常install。也尝试过update project -> clean -> install的循环,后面给出创建该项目的过程和eclipse的配置
[INFO] Scanning for projects... [INFO] [INFO] -----------------< cn.gd.hel.study:spring-boot-study >------------------ [INFO] Building spring-boot-study 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ spring-boot-study --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ spring-boot-study --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 9 source files to F:\stsWorkSpace\studyWork\spring-boot-study\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.540 s [INFO] Finished at: 2018-09-21T21:11:17+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "pom.xml" could not be activated because it does not exist. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project spring-boot-study: 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/MojoFailureExcept |
<p>maven 的package插件没配置?</p>
我只会用基本的maven操作,还不知道这个package插件呢,刚才网上找了一下好像也没有说这个的,是packge打包命令吗?这个我试过,也是提示编译插件的问题
<pre><build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.0.5.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build></pre>
<p>你看一下 javac -version</p>
<p>把这勾一下,要选jdk,不要选jre <img alt="" height="742" src="https://static.oschina.net/uploads/space/2018/0926/091503_AWVx_3233292.png" width="897"></p>
<p>不好意思哈,很久没上。发现并不是配置有问题,我通过命令行mvn install是可以正常打包,而使用STS就会报错,我也不明白什么情况。。</p>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。