From 7c6d61ee105e72d9c014e6333419d204d046d604 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 15 Oct 2018 22:51:12 +0200 Subject: [PATCH] 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 --- .../src/site/apt/examples/custom-layout.apt | 1 + .../apt/examples/repackage-classifier.apt.vm | 77 +++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt index 8ed1d734cc..5d18f8000b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/custom-layout.apt @@ -22,6 +22,7 @@ ${project.version} + repackage repackage diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm index 3d2fee3457..d64dc2ea64 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-classifier.apt.vm @@ -29,6 +29,7 @@ ${project.version} + repackage repackage @@ -45,6 +46,38 @@ ... +--- + + 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.groupId} + ${project.artifactId} + + + repackage + + exec + + + + ... + + ... + + ... + + ... + --- This configuration will generate two artifacts: the original one and the repackaged @@ -84,6 +117,7 @@ ${project.version} + repackage repackage @@ -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: + +--- + + ... + + ... + + ... + + org.apache.maven.plugins + maven-jar-plugin + + + default-jar + + task + + + + + + ${project.groupId} + ${project.artifactId} + + + repackage + + task + + + + ... + + ... + + ... + + ... + +--- + +