如何用Maven工具打包Spring Boot项目以生成IDEA兼容的jar包?
- 内容介绍
- 文章标签
- 相关推荐
本文共计124个文字,预计阅读时间需要1分钟。
在pom.xml文件中添加以下配置:
xml org.springframework.boot spring-boot-starter 1.0.0.RELEASE
org.springframework.boot spring-boot-maven-plugin 2.5.3 true org.apache.maven.plugins maven-release-plugin 2.5.3
1、pom.xml文件中增加以下配置org.springframework.boot1、pom.xml文件中增加以下配置
org.springframework.bootspring-boot-maven-pluginrepackagecom.konsy.TestProjectApplicationorg.apache.maven.pluginsmaven-release-plugin2.5.3
2、点击maven插件中的package 3、到target目录下找到jar包 执行 java -jar xxxx.jar即可执行 4.如果是打第三方库 需要增加
xxx.xxx.xxx xxx 1.0 system ${basedir}/libs/xxx.jar
同时
org.springframework.bootspring-boot-maven-plugintrue
本文共计124个文字,预计阅读时间需要1分钟。
在pom.xml文件中添加以下配置:
xml org.springframework.boot spring-boot-starter 1.0.0.RELEASE
org.springframework.boot spring-boot-maven-plugin 2.5.3 true org.apache.maven.plugins maven-release-plugin 2.5.3
1、pom.xml文件中增加以下配置org.springframework.boot1、pom.xml文件中增加以下配置
org.springframework.bootspring-boot-maven-pluginrepackagecom.konsy.TestProjectApplicationorg.apache.maven.pluginsmaven-release-plugin2.5.3
2、点击maven插件中的package 3、到target目录下找到jar包 执行 java -jar xxxx.jar即可执行 4.如果是打第三方库 需要增加
xxx.xxx.xxx xxx 1.0 system ${basedir}/libs/xxx.jar
同时
org.springframework.bootspring-boot-maven-plugintrue

