[英]Why spring boot generates jar or war file with .original extension?
Why after building spring boot app, it generates two jar or war files with .original
extension? 为什么在构建Spring Boot应用之后,它会生成两个具有.original
扩展名的jar或war文件? I use spring boot maven build plugin. 我使用Spring Boot Maven构建插件。 For example: 例如:
application.war
application.war.original
The answer is that you are using repackage
goal in your spring-boot-maven-plugin
. 答案是您在spring-boot-maven-plugin
中使用了repackage
目标。 So, What it does? 那么,它的作用是什么?
Maven first builds your project and packages your classes and resources into a WAR (${artifactId}.war)
file. Maven首先构建您的项目,并将您的类和资源打包到WAR (${artifactId}.war)
文件中。
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
. 在此目标中,pom.xml中提到的所有依赖项都打包在一个新的WAR (${artifactId}.war)
,并且先前生成的war被重命名为${artifactId}.war.original
。
I assume that you're using the spring boot maven build plugin. 我假设您使用的是Spring Boot Maven构建插件。 This behavior is documented here : https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html 此行为记录在这里 : https : //docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.