之前一直对于打包插件一知半解,对于出现的问题也感觉无从下手,后来整理了一下这方面的资料,记录下来方便备忘
引入配置:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
新增后可以看Maven工具栏中有Plugins部分
-
build-info:生成项目的构建信息文件 build-info.properties
-
repackage:这个是默认 goal,在 mvn package 执行之后,这个命令再次打包生成可执行的 jar,同时将 mvn package 生成的 jar 重命名为 *.origin
-
run:这个可以用来运行 Spring Boot 应用