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> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<build.number>${buildNumber}</build.number> <build.number>${buildNumber}</build.number>
<minecraft.plugin.name>${project.name}</minecraft.plugin.name>
<minecraft.plugin.version>${project.version} ${buildDescription}</minecraft.plugin.version> <minecraft.plugin.version>${project.version} ${buildDescription}</minecraft.plugin.version>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
@ -37,6 +38,10 @@
<id>spigot-repo</id> <id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public</url> <url>https://hub.spigotmc.org/nexus/content/groups/public</url>
</repository> </repository>
<repository>
<id>paper-repo</id>
<url>https://papermc.io/repo/content/groups/public</url>
</repository>
</repositories> </repositories>
<dependencies> <dependencies>
@ -81,31 +86,4 @@
</profile> </profile>
</profiles> </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> </project>

View File

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

View File

@ -25,6 +25,18 @@
<artifactId>worldguard-legacy</artifactId> <artifactId>worldguard-legacy</artifactId>
<version>7.0.0-SNAPSHOT</version> <version>7.0.0-SNAPSHOT</version>
<scope>provided</scope> <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> </dependency>
</dependencies> </dependencies>

View File

@ -19,15 +19,33 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>de.themoep.randomteleport</groupId> <groupId>${project.groupId}</groupId>
<artifactId>randomteleport-hooks</artifactId> <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> <version>${project.version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>${parent.name}</finalName> <finalName>${minecraft.plugin.name}</finalName>
<outputDirectory>../target/</outputDirectory> <outputDirectory>../target/</outputDirectory>
<resources> <resources>
<resource> <resource>
@ -35,6 +53,30 @@
<directory>${project.basedir}/src/main/resources</directory> <directory>${project.basedir}/src/main/resources</directory>
</resource> </resource>
</resources> </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> </build>
</project> </project>