Files
AkarinMC/sources/pom.xml

442 lines
19 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>akarin</artifactId>
<packaging>jar</packaging>
<version>1.12.2-R0.4-SNAPSHOT</version>
<name>Akarin</name>
<url>https://github.com/Akarin-project/Akarin</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>1.12.2-R0.1-SNAPSHOT</api.version>
<minecraft.version>1.12.2</minecraft.version>
<minecraft_version>1_12_R1</minecraft_version>
<buildtag.prefix>git-Bukkit-</buildtag.prefix>
<buildtag.suffix></buildtag.suffix>
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<parent>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-parent</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<dependencies>
<!-- bugfixes (netty#6607) -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.78.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>${api.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper</artifactId>
<version>${minecraft.version}-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId>
<version>${minecraft.version}-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
<version>5.0.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.21.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.45</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.minecrell</groupId>
<artifactId>terminalconsoleappender</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.2</version>
<scope>runtime</scope>
</dependency>
<!--
Required to add the missing Log4j2Plugins.dat file from log4j-core
which has been removed by Mojang. Without it, log4j has to classload
all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start.
-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.2</version>
<scope>compile</scope>
</dependency>
<!-- Paper - Add additional Log4J dependencies -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.17.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-iostreams</artifactId>
<version>2.17.2</version>
</dependency>
<!-- Paper - Async loggers -->
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.4.4</version>
<scope>runtime</scope>
</dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<!-- Akarin -->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>9.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>9.2</version>
</dependency>
<dependency>
<groupId>io.akarin</groupId>
<artifactId>mixin</artifactId>
<version>0.8.5</version>
</dependency>
<dependency>
<groupId>io.akarin</groupId>
<artifactId>legacylauncher</artifactId>
<version>1.26</version>
</dependency>
<dependency>
<groupId>com.googlecode.concurrent-locks</groupId>
<artifactId>concurrent-locks</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.9.3</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>elmakers-repo</id>
<url>http://maven.elmakers.com/repository/</url>
</repository>
<repository>
<id>spongepowered-repo</id>
<url>https://repo.spongepowered.org/maven/</url>
</repository>
<repository>
<id>nallar-repo</id>
<url>http://repo.nallar.me/</url>
</repository>
<repository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/repository/public/</url>
</repository>
<repository>
<id>josephworks</id>
<url>https://repo.josephworks.net/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype-nexusg</id>
<url>https://oss.sonatype.org/content/repositories</url>
</repository>
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>paper</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</pluginRepository>
</pluginRepositories>
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
<finalName>akarin-${minecraft.version}</finalName>
<defaultGoal>clean install</defaultGoal> <!-- Paper -->
<plugins>
<plugin>
<groupId>com.lukegb.mojo</groupId>
<artifactId>gitdescribe-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<outputPrefix>git-Akarin-</outputPrefix>
<scmDirectory>../..</scmDirectory> <!-- Akarin -->
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>gitdescribe</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<forceCreation>true</forceCreation> <!-- Required to prevent shading the jar multiple times -->
<archive>
<manifestEntries>
<Main-Class>net.minecraft.launchwrapper.Launch</Main-Class>
<Implementation-Title>CraftBukkit</Implementation-Title>
<Implementation-Version>${describe}</Implementation-Version>
<Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
<Specification-Vendor>Bukkit Team</Specification-Vendor>
<Multi-Release>true</Multi-Release> <!-- Paper start - update log4j -->
</manifestEntries>
<manifestSections>
<manifestSection>
<name>net/bukkit/</name>
<manifestEntries>
<Sealed>true</Sealed>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>com/bukkit/</name>
<manifestEntries>
<Sealed>true</Sealed>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>org/bukkit/</name>
<manifestEntries>
<Sealed>true</Sealed>
</manifestEntries>
</manifestSection>
</manifestSections>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation> <!-- Paper -->
<filters>
<filter>
<artifact>org.spigotmc:minecraft-server:**</artifact>
<excludes>
<exclude>io/netty/**</exclude>
<exclude>org/apache/logging/log4j/**</exclude>
</excludes>
</filter>
<filter>
<artifact>io.akarin:legacylauncher:**</artifact>
<excludes>
<exclude>org/objectweb/**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.destroystokyo.paper:paper-api:**</artifact>
<excludes>
<exclude>org/objectweb/**</exclude>
</excludes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<relocations>
<!-- Paper - Workaround for hardcoded path lookup in dependency, easier than forking it - GH-189 -->
<!--<relocation>-->
<!--<pattern>joptsimple</pattern>-->
<!--<shadedPattern>org.bukkit.craftbukkit.libs.joptsimple</shadedPattern>-->
<!--</relocation>-->
<relocation>
<pattern>jline</pattern>
<shadedPattern>org.bukkit.craftbukkit.libs.jline</shadedPattern>
</relocation>
<!-- Paper - Don't relocate fastutil in order to prevent api breakage -->
<!--<relocation>-->
<!--<pattern>it.unimi</pattern>-->
<!--<shadedPattern>org.bukkit.craftbukkit.libs.it.unimi</shadedPattern>-->
<!--</relocation>-->
<relocation>
<pattern>org.bukkit.craftbukkit</pattern>
<shadedPattern>org.bukkit.craftbukkit.v${minecraft_version}</shadedPattern>
<excludes>
<exclude>org.bukkit.craftbukkit.Main*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>net.minecraft.server</pattern>
<shadedPattern>net.minecraft.server.v${minecraft_version}</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/java.sql.Driver</resource>
</transformer>
<transformer implementation="io.github.edwgiz.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer" />
</transformers>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.github.edwgiz</groupId>
<artifactId>log4j-maven-shade-plugin-extensions</artifactId>
<version>2.17.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<excludes>
<exclude>org/spigotmc/CaseInsensitiveHashingStrategy.java</exclude>
<exclude>org/spigotmc/CaseInsensitiveMap.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- BUILDTOOLS-362 / SUREFIRE-1444 - newer version fails in Docker -->
<version>2.20</version>
<configuration>
<workingDirectory>${basedir}/target/test-server</workingDirectory>
<excludes>
<exclude>org/bukkit/craftbukkit/inventory/ItemStack*Test.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>development</id>
<!-- Paper start - activate by default -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- Paper end -->
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.16</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>