@@ -107,30 +107,22 @@ shell completion scripts, man pages, license, readme, and more.
107107== Creating the distribution
108108
109109We can leverage the link:http://maven.apache.org/plugins/maven-assembly-plugin/[maven-assembly-plugin] to create such
110- a distribution. We'll also make use of the link:https://github.com/maveniverse/nisse[Nisse Maven plugin] to properly
110+ a distribution. We'll also make use of the link:https://github.com/trustin/os-maven-plugin[os-maven- plugin] to properly
111111identify the platform on which this executable can run, adding said platform to the distribution's filename.
112112
113- First, let's add the Nisse Maven plugin to the `pom.xml`. This plugin works as a Maven extension and as such must be added
113+ First, let's add the os-maven- plugin to the `pom.xml`. This plugin works as a Maven extension and as such must be added
114114to the `<build>` section of the file:
115115
116116[source,xml]
117117----
118118 <build>
119- <plugins>
120- <plugin>
121- <groupId>eu.maveniverse.maven.plugins</groupId>
122- <artifactId>nisse-plugin3</artifactId>
123- <version>0.3.4</version>
124- <executions>
125- <execution>
126- <id>inject-properties</id>
127- <goals>
128- <goal>inject-properties</goal>
129- </goals>
130- <phase>validate</phase>
131- </execution>
132- </executions>
133- </plugin>
119+ <extensions>
120+ <extension>
121+ <groupId>kr.motd.maven</groupId>
122+ <artifactId>os-maven-plugin</artifactId>
123+ <version>1.7.1</version>
124+ </extension>
125+ </extensions>
134126 <!-- ... -->
135127----
136128
@@ -147,7 +139,7 @@ their own directory to avoid cluttering the `target` directory. Thus, let's add
147139
148140Now we configure the maven-assembly-plugin to create a Zip and a Tar file containing the executable and any supporting files
149141it may need to perform its job. Take special note on the name of the distribution, this is where we make use of the platform
150- properties detected by the os-detector- maven-plugin. This plugin is configured in its own profile with the `single` goal bound to
142+ properties detected by the os-maven-plugin. This plugin is configured in its own profile with the `single` goal bound to
151143the `package` phase. It's done this way to avoid rebuilding the distribution every single time the build is invoked, as we
152144only needed when we're ready for a release.
153145
@@ -164,7 +156,7 @@ only needed when we're ready for a release.
164156 <configuration>
165157 <attach>false</attach>
166158 <appendAssemblyId>false</appendAssemblyId>
167- <finalName>${project.artifactId}-${project.version}-${nisse.os .classifier}</finalName>
159+ <finalName>${project.artifactId}-${project.version}-${os.detected .classifier}</finalName>
168160 <outputDirectory>${distribution.directory}</outputDirectory>
169161 <workDirectory>${project.build.directory}/assembly/work</workDirectory>
170162 <descriptors>
@@ -665,21 +657,14 @@ As a reference, these are the full contents of the `pom.xml`:
665657 </dependency>
666658 </dependencies>
667659 <build>
660+ <extensions>
661+ <extension>
662+ <groupId>kr.motd.maven</groupId>
663+ <artifactId>os-maven-plugin</artifactId>
664+ <version>1.7.1</version>
665+ </extension>
666+ </extensions>
668667 <plugins>
669- <plugin>
670- <groupId>eu.maveniverse.maven.nisse</groupId>
671- <artifactId>plugin3</artifactId>
672- <version>0.3.4</version>
673- <executions>
674- <execution>
675- <id>inject-properties</id>
676- <goals>
677- <goal>inject-properties</goal>
678- </goals>
679- <phase>validate</phase>
680- </execution>
681- </executions>
682- </plugin>
683668 <plugin>
684669 <groupId>${quarkus.platform.group-id}</groupId>
685670 <artifactId>quarkus-maven-plugin</artifactId>
@@ -738,7 +723,7 @@ As a reference, these are the full contents of the `pom.xml`:
738723 <configuration>
739724 <attach>false</attach>
740725 <appendAssemblyId>false</appendAssemblyId>
741- <finalName>${project.artifactId}-${project.version}-${nisse.os .classifier}</finalName>
726+ <finalName>${project.artifactId}-${project.version}-${os.detected .classifier}</finalName>
742727 <outputDirectory>${distribution.directory}</outputDirectory>
743728 <workDirectory>${project.build.directory}/assembly/work</workDirectory>
744729 <descriptors>
0 commit comments