Fix issues with maven build

This commit is contained in:
Phoenix616 2019-01-23 00:48:02 +01:00
parent f0ed0105d1
commit 9017dadc15
4 changed files with 64 additions and 31 deletions

32
pom.xml
View File

@ -14,6 +14,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<build.number>${buildNumber}</build.number>
<minecraft.plugin.name>${project.name}</minecraft.plugin.name>
<minecraft.plugin.version>${project.version} ${buildDescription}</minecraft.plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
@ -37,6 +38,10 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public</url>
</repository>
<repository>
<id>paper-repo</id>
<url>https://papermc.io/repo/content/groups/public</url>
</repository>
</repositories>
<dependencies>
@ -81,31 +86,4 @@
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>io.papermc.lib</pattern>
<shadedPattern>de.themoep.randomteleport.paperlib</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -24,7 +24,8 @@
<dependency>
<groupId>de.themoep.randomteleport</groupId>
<artifactId>randomteleport-hook</artifactId>
<version>${version}</version>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -25,6 +25,18 @@
<artifactId>worldguard-legacy</artifactId>
<version>7.0.0-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -19,15 +19,33 @@
<dependencies>
<dependency>
<groupId>de.themoep.randomteleport</groupId>
<artifactId>randomteleport-hooks</artifactId>
<groupId>${project.groupId}</groupId>
<artifactId>randomteleport-hook</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}.pluginhook</groupId>
<artifactId>worldguard-6</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}.pluginhook</groupId>
<artifactId>worldguard-7</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}.pluginhook</groupId>
<artifactId>worldborder</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${parent.name}</finalName>
<finalName>${minecraft.plugin.name}</finalName>
<outputDirectory>../target/</outputDirectory>
<resources>
<resource>
@ -35,6 +53,30 @@
<directory>${project.basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>io.papermc.lib</pattern>
<shadedPattern>de.themoep.randomteleport.paperlib</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>