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" <assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/ASSEMBLY/2.1.1" 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"> 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> <formats>
<format>jar</format> <format>jar</format>
</formats> </formats>

View File

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

View File

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

View File

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

View File

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