为什么spring boot会生成带有.original扩展的jar或war文件? [英] why spring boot generate jar or war file with .original extention?

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

问题描述

为什么在构建spring boot应用程序之后,它会生成两个带有.original扩展的jar或war文件?我使用spring boot maven build plugin。
例如:

why after build spring boot app, It generates two jar or war file with .original extention?I use spring boot maven build plugin. for example:


  1. application.war

  2. application.war.original


推荐答案

答案是您正在使用重新包装你的 spring-boot-maven-plugin 中的目标。
那么,它的作用是什么?

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天全站免登陆