为什么spring boot会生成扩展名为.original的jar或war文件? [英] Why spring boot generates jar or war file with .original extension?

查看:48
本文介绍了为什么spring boot会生成扩展名为.original的jar或war文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么构建spring boot app后,会生成两个带有.original扩展名的jar或war文件?我使用 Spring Boot Maven 构建插件.例如:

Why after building spring boot app, it generates two jar or war files with .original extension? I use spring boot maven build plugin. For example:

  1. application.war
  2. application.war.original

推荐答案

答案是您在 spring-boot-maven-plugin 中使用了 repackage 目标.那么,它有什么作用?

The answer is that you are using repackage goal in your spring-boot-maven-plugin. So, What it does?

Maven 首先构建您的项目并将您的类和资源打包到一个 WAR (${artifactId}.war) 文件中.

Maven first builds your project and packages your classes and resources into a WAR (${artifactId}.war) file.

然后,重新包装发生.在这个目标中,pom.xml 中提到的所有依赖项都打包在一个新的 WAR (${artifactId}.war) 中,并且之前生成的 war 被重命名为 ${artifactId}.war.original.

Then, repackaging happens. In this goal, all the dependencies mentioned in the pom.xml are packaged inside a new WAR (${artifactId}.war) and the previously generated war is renamed to ${artifactId}.war.original.

这篇关于为什么spring boot会生成扩展名为.original的jar或war文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆