【spring Boot】2.在Myecplise上把spring Boot项目打包 war包和jar包
2017-10-01 18:15
676 查看
========================================================第一部分=============================================================
第一部分:使用maven项目中自带的插件,将maven的web项目打包成war包
使用的项目是上一章中的maven项目,原封不动
看一下pom.xml文件
第一部分:使用maven项目中自带的插件,将maven的web项目打包成war包
使用的项目是上一章中的maven项目,原封不动
看一下pom.xml文件
[INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building firstSpringBootExample 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ firstSpringBootExample --- [INFO] Deleting D:\workspace2\firstSpringBootExample\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ firstSpringBootExample --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ firstSpringBootExample --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to D:\workspace2\firstSpringBootExample\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: 2.398 s [INFO] Finished at: 2017-10-01T17:41:26+08:00 [INFO] Final Memory: 13M/232M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project firstSpringBootExample: 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[/code]
View Code
解决方法:http://www.cnblogs.com/sxdcgaq8080/p/7617542.html
4.解决错误之后,重新进行打包操作
5.执行之后结果如下:
=====================================================第二部分=========================================================
第二部分,使用springBoot提供的插件,将项目打包为jar包
相关文章推荐
- IntelliJ IDEA Spring Boot(8)使用JSP,打包jar文件运行带有jsp的项目
- Springboot项目按自定义的jar包方式打包
- idea打包SpringBoot项目打包成jar包和war
- springboot项目打包部署时把静态资源打包到jar中、或修改静态资源根目录
- maven构建的spring boot项目打包成可执行的jar(fat jar)
- 把 spring-boot 项目打包成可运行的 jar 包
- Spring boot框架项目,使用maven命令将配置文件打包到jar包外,项目运行读取jar外配置文件
- 用gradle把springboot项目打包成jar
- Spring-boot web 工程构建,并把maven子项目模块依赖jar打包,笔记
- Spring Boot学习--打包一个可执行的jar项目
- 使用springboot框架写项目打包jar发布后读取项目下静态文件异常
- 如何将spring boot项目打包成war包
- springboot web项目打包成 jar包部署在服务器
- SpringBoot项目打包三方JAR
- 在IDEA中如何将Spring boot项目打包成可执行的jar包并发布到linux服务器
- 在IDEA中将SpringBoot项目打包成jar包的方法
- IDEA 快速将spring boot项目打包成jar包,简单快速有效
- Spring boot jar项目修改为war包项目
- spring boot 项目打包jar 启动方式,以及 可能遇到的坑。
- Springboot中如何引入本地jar包,并通过maven把项目成功打包成jar包部署