Spigot Maven

Aug 17, 2017 at 9:47 AM
Spigot Maven
  • Spigot Maven Repository

    Information on what to add to your pom.xml for Spigot-api and Bukkit



    Maven Repository(top)

    Spigot has a maven repository if you use it to build your plugins.
    https://hub.spigotmc.org/nexus/#view-repositories;snapshots~browsestorage

    pom.xml(top)

    This is an example of what to put in your pom.xml to get the API's from the repository.
    You should only use one of them.
    If you want to use Spigot API's, in addition to Bukkit, you should use just the Spigot API.
    Just add the following code in your pom file.
    Code (XML):
    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>
    <dependencies>
        <!--Spigot API-->
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.12.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <!--Bukkit API-->
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>bukkit</artifactId>
            <version>1.12.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    If you need to use NMS, you will also need to add CraftBukkit as a dependency, as seen below:
    Code (XML):
    <dependency>
        <groupId>org.bukkit</groupId>
        <artifactId>craftbukkit</artifactId>
        <version>1.12.1-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    You need to run BuildTools to be able to add CraftBukkit to your dependencies.

    To get Spigot patches for NMS you will need to add Spigot as a dependency (not Spigot API):
    Code (XML):
    <dependency> <!-- Spigot (this includes Spigot API, Bukkit API, Craftbukkit and NMS) -->
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot</artifactId>
        <version>1.12.1-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    For this to work you will need to run BuildTools
  • Loading...
  • Loading...