171 lines
7.0 KiB
XML
171 lines
7.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<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>
|
||
|
||
<groupId>de.teleportsuite</groupId>
|
||
<artifactId>TeleportSuite</artifactId>
|
||
<version>1.0.2</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<properties>
|
||
<!--
|
||
Java 21 (LTS) als Compiler-Ziel.
|
||
Ein mit Java 21 kompiliertes Plugin läuft problemlos
|
||
auf Java 25 (keine Source-Änderungen nötig).
|
||
Soll ausschließlich Java-25-Syntax genutzt werden,
|
||
einfach den Wert auf 25 ändern.
|
||
-->
|
||
<maven.compiler.release>21</maven.compiler.release>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
|
||
<!-- Pfad zur lokalen BungeeCord.jar (liegt im Projekt unter lib/) -->
|
||
<bungeecord.jar.path>${project.basedir}/lib/BungeeCord.jar</bungeecord.jar.path>
|
||
</properties>
|
||
|
||
<!-- ============================================================ -->
|
||
<!-- Repositories -->
|
||
<!-- ============================================================ -->
|
||
<repositories>
|
||
<!-- Spigot / Paper API -->
|
||
<repository>
|
||
<id>spigot-repo</id>
|
||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||
</repository>
|
||
</repositories>
|
||
|
||
<!-- ============================================================ -->
|
||
<!-- Dependencies -->
|
||
<!-- ============================================================ -->
|
||
<dependencies>
|
||
|
||
<!-- Spigot API 1.21.4 – provided, kommt vom Server -->
|
||
<dependency>
|
||
<groupId>org.spigotmc</groupId>
|
||
<artifactId>spigot-api</artifactId>
|
||
<version>1.21.4-R0.1-SNAPSHOT</version>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
|
||
<!--
|
||
BungeeCord.jar aus dem lokalen lib/-Ordner.
|
||
scope=provided → wird NICHT ins Shade-JAR gepackt
|
||
(der Server hat BungeeCord bereits im Classpath).
|
||
-->
|
||
<dependency>
|
||
<groupId>net.md-5</groupId>
|
||
<artifactId>bungeecord-all</artifactId>
|
||
<version>1.21-SNAPSHOT</version>
|
||
<scope>system</scope>
|
||
<systemPath>${bungeecord.jar.path}</systemPath>
|
||
</dependency>
|
||
|
||
<!-- MySQL Connector – wird ins Shade-JAR gepackt -->
|
||
<dependency>
|
||
<groupId>com.mysql</groupId>
|
||
<artifactId>mysql-connector-j</artifactId>
|
||
<version>9.1.0</version>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
|
||
<!-- SQLite JDBC – wird ins Shade-JAR gepackt -->
|
||
<dependency>
|
||
<groupId>org.xerial</groupId>
|
||
<artifactId>sqlite-jdbc</artifactId>
|
||
<version>3.47.1.0</version>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
|
||
<!-- HikariCP Connection-Pool – wird ins Shade-JAR gepackt -->
|
||
<dependency>
|
||
<groupId>com.zaxxer</groupId>
|
||
<artifactId>HikariCP</artifactId>
|
||
<version>6.2.1</version>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
|
||
</dependencies>
|
||
|
||
<!-- ============================================================ -->
|
||
<!-- Build -->
|
||
<!-- ============================================================ -->
|
||
<build>
|
||
<!-- Ausgabe-JAR bekommt keinen Version-Suffix -->
|
||
<finalName>${project.artifactId}</finalName>
|
||
|
||
<plugins>
|
||
|
||
<!-- Compiler-Plugin – explizit für Java 21 / 25 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>3.13.0</version>
|
||
<configuration>
|
||
<release>${maven.compiler.release}</release>
|
||
<encoding>UTF-8</encoding>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!--
|
||
Shade-Plugin:
|
||
- packt compile-scope Dependencies in das Ziel-JAR
|
||
- system-scope (BungeeCord) wird NICHT eingeschlossen
|
||
- Relocations vermeiden Klassenkonflikte auf dem Server
|
||
-->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-shade-plugin</artifactId>
|
||
<version>3.6.0</version>
|
||
<executions>
|
||
<execution>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>shade</goal>
|
||
</goals>
|
||
<configuration>
|
||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||
|
||
<!-- system-scope JARs vom Shade ausschließen -->
|
||
<artifactSet>
|
||
<excludes>
|
||
<exclude>net.md-5:bungeecord-all</exclude>
|
||
</excludes>
|
||
</artifactSet>
|
||
|
||
<!-- Relocation: verhindert Konflikte mit anderen Plugins -->
|
||
<relocations>
|
||
<relocation>
|
||
<pattern>com.mysql</pattern>
|
||
<shadedPattern>de.teleportsuite.libs.mysql</shadedPattern>
|
||
</relocation>
|
||
<relocation>
|
||
<pattern>com.zaxxer.hikari</pattern>
|
||
<shadedPattern>de.teleportsuite.libs.hikari</shadedPattern>
|
||
</relocation>
|
||
</relocations>
|
||
|
||
<!-- Unnötige Meta-Dateien aus dem Shade-JAR entfernen -->
|
||
<filters>
|
||
<filter>
|
||
<artifact>*:*</artifact>
|
||
<excludes>
|
||
<exclude>META-INF/LICENSE*</exclude>
|
||
<exclude>META-INF/NOTICE*</exclude>
|
||
<exclude>META-INF/DEPENDENCIES</exclude>
|
||
<exclude>META-INF/*.SF</exclude>
|
||
<exclude>META-INF/*.DSA</exclude>
|
||
<exclude>META-INF/*.RSA</exclude>
|
||
</excludes>
|
||
</filter>
|
||
</filters>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
</plugins>
|
||
</build>
|
||
</project>
|