Why spring boot generates jar or war file with .original extension?

十年热恋 提交于 2019-12-06 17:00:57

问题


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:


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

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

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.




回答2:


I assume that you're using the spring boot maven build plugin. This behavior is documented here: https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html



来源:https://stackoverflow.com/questions/43641664/why-spring-boot-generates-jar-or-war-file-with-original-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!