Browse Source

Document finalName alternative for repackage goal

Closes gh-16334
pull/16472/head
Stephane Nicoll 7 years ago
parent
commit
554dec1a3e
  1. 42
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-name.apt.vm
  2. 2
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt
  3. 1
      spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml

42
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/repackage-name.apt.vm

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
-----
Repackage classifier
-----
Stephane Nicoll
-----
2019-03-29
-----
If you need the repackage jar to have a different local name than the one defined by
the <<<artifactId>>> attribute of the project, simply use the standard <<<finalName>>>
as shown in the following example:
---
<project>
...
<build>
<finalName>my-app</finalName>
<plugins>
...
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
...
</plugin>
...
</plugins>
...
</build>
...
</project>
---
This configuration will generate the repackaged artifact in <<<target/my-app.jar>>>.

2
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/index.apt

@ -46,6 +46,8 @@ Spring Boot Maven Plugin @@ -46,6 +46,8 @@ Spring Boot Maven Plugin
* {{{./examples/repackage-classifier.html}Custom repackage classifier}}
* {{{./examples/repackage-name.html}Custom repackage name}}
* {{{./examples/repackage-disable-attach.html}Local repackaged artifact}}
* {{{./examples/exclude-dependency.html}Exclude a dependency}}

1
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/site.xml

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
</menu>
<menu name="Examples">
<item name="Custom repackage classifier" href="examples/repackage-classifier.html"/>
<item name="Custom repackage name" href="examples/repackage-name.html"/>
<item name="Local repackaged artifact" href="examples/repackage-disable-attach.html"/>
<item name="Exclude a dependency" href="examples/exclude-dependency.html"/>
<item name="Debug the application" href="examples/run-debug.html"/>

Loading…
Cancel
Save