Add a classifier for nms assembly

This commit is contained in:
Flowsqy 2022-07-26 22:23:46 +02:00
parent 40497ca829
commit 902686ea47
5 changed files with 27 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/ASSEMBLY/2.1.1"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.1 http://maven.apache.org/xsd/assembly-2.1.1.xsd">
<id>nms-assembly</id>
<id>${nms-classifier}</id>
<formats>
<format>jar</format>
</formats>

View File

@ -15,7 +15,7 @@
<packaging>pom</packaging>
<properties>
<builtFilePath>target/${project.build.finalName}.jar</builtFilePath>
<builtFilePath>target/${project.build.finalName}-${nms-classifier}.jar</builtFilePath>
</properties>
<!-- Ensure build order for assembly -->
@ -62,7 +62,6 @@
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>nms-assembly.xml</descriptor>
</descriptors>
@ -80,9 +79,12 @@
</goals>
<phase>install</phase>
<configuration>
<generatePom>true</generatePom>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging>
<classifier>${nms-classifier}</classifier>
<file>${builtFilePath}</file>
</configuration>
</execution>
@ -98,10 +100,13 @@
</goals>
<phase>deploy</phase>
<configuration>
<generatePom>true</generatePom>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging>
<file>${builtFilePath}</file>
<classifier>${nms-classifier}</classifier>
<repositoryId>${project.distributionManagement.repository.id}</repositoryId>
<url>${project.distributionManagement.repository.url}</url>
</configuration>

View File

@ -82,6 +82,15 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>

View File

@ -87,6 +87,7 @@
<dependency>
<groupId>de.epiceric</groupId>
<artifactId>shopchest-nms-all</artifactId>
<classifier>${nms-classifier}</classifier>
</dependency>
</dependencies>

View File

@ -83,6 +83,9 @@
<!-- Avoid the deployment of all artifact -->
<maven.deploy.skip>true</maven.deploy.skip>
<!-- The NMS assembly classifier -->
<nms-classifier>legacy</nms-classifier>
<!-- Name of the plugin for the final jar -->
<buildName>ShopChest</buildName>
</properties>
@ -315,6 +318,7 @@
<groupId>de.epiceric</groupId>
<artifactId>shopchest-nms-all</artifactId>
<version>1.0.0</version>
<classifier>${nms-classifier}</classifier>
</dependency>
<dependency>
<groupId>de.epiceric</groupId>
@ -328,6 +332,11 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>