Minepacks/Minepacks/pom.xml

309 lines
10 KiB
XML

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>Minepacks</artifactId>
<parent>
<artifactId>Minepacks-Parent</artifactId>
<groupId>at.pcgamingfreaks</groupId>
<version>${revision}</version>
<relativePath>..</relativePath>
</parent>
<version>${revision}</version>
<packaging>jar</packaging>
<name>Minepacks</name>
<description>Minepacks is a backpack plugin with different backpack sizes, multi language support and SQLite and MySQL storage support.</description>
<url>https://www.spigotmc.org/resources/19286/</url>
<properties>
<dependencies>PCGF_PluginLib</dependencies>
<soft-dependencies/>
<mainClass>${project.groupId}.${project.artifactId}.Bukkit.${project.artifactId}</mainClass>
<releaseType>Normal</releaseType>
<updateChannel>Release</updateChannel>
</properties>
<pluginRepositories>
<pluginRepository>
<id>apache-snapshot</id>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<!-- Minepacks API -->
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>Minepacks-API</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>Minepacks-MagicValues</artifactId>
<version>${revision}</version>
</dependency>
<!-- PCGF Plugin Lib -->
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>PluginLib</artifactId>
<version>${pcgfPluginLibVersion}</version>
</dependency>
<!-- Tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean package test</defaultGoal>
<testSourceDirectory>test/src</testSourceDirectory>
<resources>
<resource>
<directory>resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>./</directory>
<includes>
<include>LICENSE</include>
</includes>
</resource>
<resource>
<directory>${project.build.directory}/generated-resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
</plugin>
<!-- Bundle the API into the JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${mavenShade.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>false</minimizeJar>
<artifactSet>
<includes>
<include>at.pcgamingfreaks:Minepacks-API</include>
<include>at.pcgamingfreaks:Minepacks-MagicValues</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>Standalone</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<version>${project.version}-Standalone</version>
<dependencies/>
<mainClass>${project.groupId}.${project.artifactId}Standalone.Bukkit.${project.artifactId}</mainClass>
<releaseType>Standalone</releaseType>
</properties>
<build>
<plugins>
<!-- Shades some required libs into the final jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${mavenShade.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>Standalone</shadedClassifierName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>false</minimizeJar>
<outputDirectory>${project.build.directory}</outputDirectory>
<artifactSet>
<includes>
<include>at.pcgamingfreaks:Minepacks-API</include>
<include>at.pcgamingfreaks:Minepacks-MagicValues</include>
<include>at.pcgamingfreaks:PluginLib</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>at.pcgf.libs</pattern>
<shadedPattern>at.pcgamingfreaks.MinepacksStandalone.libs</shadedPattern>
</relocation>
<relocation>
<pattern>at.pcgamingfreaks.Minepacks</pattern>
<shadedPattern>at.pcgamingfreaks.MinepacksStandalone</shadedPattern>
<excludes>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.Backpack</exclude>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.Callback</exclude>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin</exclude>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommandManager</exclude>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.WorldBlacklistMode</exclude>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.ItemFilter</exclude>
<exclude>at.pcgamingfreaks.Minepacks.Bukkit.API.Events.*</exclude>
<exclude>at.pcgamingfreaks.Minepacks.MagicValues</exclude>
</excludes>
</relocation>
<relocation>
<pattern>at.pcgamingfreaks</pattern>
<shadedPattern>at.pcgamingfreaks.MinepacksStandalone.libs.at.pcgamingfreaks</shadedPattern>
<excludes>
<exclude>at.pcgamingfreaks.Minepacks.**</exclude>
</excludes>
</relocation>
</relocations>
<filters>
<filter>
<artifact>at.pcgamingfreaks:PluginLib</artifact>
<excludes>
<exclude>at/pcgamingfreaks/Bungee/**</exclude>
<exclude>at/pcgamingfreaks/PluginLib/**</exclude>
<exclude>PCGF_PluginLib.properties</exclude>
<exclude>update.yml</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- Replace all the PCGF-PluginLib code with alternatives -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>munge-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>munge</id>
<phase>generate-sources</phase>
<goals>
<goal>munge</goal>
</goals>
<configuration>
<symbols>STANDALONE</symbols>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>Release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<version>${project.version}-Release</version>
<dependencies/>
<soft-dependencies>, PCGF_PluginLib</soft-dependencies>
<mainClass>${project.groupId}.${project.artifactId}.Bukkit.${project.artifactId}BadRabbit</mainClass>
<releaseType>Release</releaseType>
</properties>
<dependencies>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>Minepacks</artifactId>
<version>${project.version}</version>
<classifier>Standalone</classifier>
</dependency>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>Minepacks-BadRabbit-Bukkit</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>Minepacks-Bootstrap-Paper</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${mavenShade.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>Release</shadedClassifierName>
<createDependencyReducedPom>false</createDependencyReducedPom>
<minimizeJar>false</minimizeJar>
<artifactSet>
<includes>
<include>at.pcgamingfreaks:Minepacks-API</include>
<include>at.pcgamingfreaks:Minepacks-MagicValues</include>
<include>at.pcgamingfreaks:Minepacks-Bootstrap-Paper</include>
<include>at.pcgamingfreaks:BadRabbit-Bukkit</include>
<include>at.pcgamingfreaks:Minepacks-BadRabbit-Bukkit</include>
<include>at.pcgamingfreaks:Minepacks</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>at.pcgamingfreaks.BadRabbit</pattern>
<shadedPattern>at.pcgamingfreaks.Minepacks</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.20</version>
<configuration>
<excludedScopes>test,provided,system</excludedScopes>
<generateBundle>true</generateBundle>
<licensesOutputFile>${project.build.directory}/generated-resources/licenses-THIRD-PARTY.xml</licensesOutputFile>
<licenseUrlReplacements>
<licenseUrlReplacement>
<regexp>https?://(www\.)?opensource\.org/licenses/mit-license\.php</regexp>
<replacement>https://ci.pcgamingfreaks.at/download/mit.txt</replacement>
</licenseUrlReplacement>
</licenseUrlReplacements>
</configuration>
<executions>
<execution>
<id>add-third-party</id>
<phase>generate-resources</phase>
<goals>
<goal>add-third-party</goal>
<goal>download-licenses</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>