Update documentation to mention execution id of repackage goal
This commit updates the documentation to reference the default execution id of the `repackage` goal when a project uses `spring-boot-starter-parent`. Closes gh-14835
This commit is contained in:
parent
2c3e8de959
commit
7c6d61ee10
|
|
@ -22,6 +22,7 @@
|
|||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
|
|
@ -45,6 +46,38 @@
|
|||
</build>
|
||||
...
|
||||
</project>
|
||||
---
|
||||
|
||||
If you are using `spring-boot-starter-parent`, the `repackage` goal is executed
|
||||
automatically in an execution with id `repackage`. In that setup, only the configuration
|
||||
should be specified as shown in the following example:
|
||||
|
||||
---
|
||||
<project>
|
||||
...
|
||||
<build>
|
||||
...
|
||||
<plugins>
|
||||
...
|
||||
<plugin>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<configuration>
|
||||
<classifier>exec</classifier>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
...
|
||||
</plugin>
|
||||
...
|
||||
</plugins>
|
||||
...
|
||||
</build>
|
||||
...
|
||||
</project>
|
||||
---
|
||||
|
||||
This configuration will generate two artifacts: the original one and the repackaged
|
||||
|
|
@ -84,6 +117,7 @@
|
|||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
|
|
@ -106,5 +140,48 @@
|
|||
same phase, it is important that the jar plugin is defined first (so that it runs before
|
||||
the repackage goal).
|
||||
|
||||
Again, if you are using `spring-boot-starter-parent`, this can be simplified as follows:
|
||||
|
||||
---
|
||||
<project>
|
||||
...
|
||||
<build>
|
||||
...
|
||||
<plugins>
|
||||
...
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-jar</id>
|
||||
<configuration>
|
||||
<classifier>task</classifier>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>${project.artifactId}</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<configuration>
|
||||
<classifier>task</classifier>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
...
|
||||
</plugin>
|
||||
...
|
||||
</plugins>
|
||||
...
|
||||
</build>
|
||||
...
|
||||
</project>
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue