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

后端 未结 2 1278
悲哀的现实
悲哀的现实 2020-12-15 16:20

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:

2条回答
  •  自闭症患者
    2020-12-15 17:15

    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.

提交回复
热议问题