-
-
Notifications
You must be signed in to change notification settings - Fork 141
Maven Setup
Daniel Ennis edited this page Apr 21, 2017
·
33 revisions
First you will need to add the repositories (you should already have Spigot) and the dependency to your pom.xml You will also need to shade the library into your plugin jar.
<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>
<repositories>
<repository>
<id>aikar</id>
<url>https://ci.emc.gs/nexus/content/groups/aikar/</url>
</repository>
<repository>
<id>spigot</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>co.aikar.commands</groupId>
<artifactId>acf</artifactId>
<version>[ACF VERSION]</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<relocations>
<relocation>
<pattern>co.aikar.commands</pattern>
<shadedPattern>[YOUR PLUGIN PACKAGE].acf</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Replace [ACF VERSION] with the latest version found on the ACF Repo Replace [YOUR PLUGIN PACKAGE] with a package to your plugin so that ACF is relocated to it.