Commit 7c6d61ee authored by Stephane Nicoll's avatar Stephane Nicoll

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
parent 2c3e8de9
......@@ -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>
---
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment