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

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

问题描述

为什么在构建spring boot应用之后,它会生成两个扩展名为.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
  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天全站免登陆