spring boot maven plugin Executa
2019-03-26 本文已影响0人
hapjin

spring-boot-starter-parent 包含了repackage goal,所以就不需要在pom.xml里面配置如下复杂的goal目标了:
<build>
...
<plugins>
...
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.3.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
因此,只需要简单地配置:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
就能打成Executable Jar
参考:11.5 Creating an Executable Jar