Cloning, Building and Compiling the Spigot Source - Historical

Applied By Dead-i: Jul 12, 2014 at 10:00 AM

Cloning, Building and Compiling the Spigot Source

Cloning, Building & Compiling the Spigot Source

Getting a copy of Spigot to develop on properly


  • Basic Git Knowledge
  • A Unix-based system or a bash interpreter (such as Cygwin, Git Bash, etc.)
  • Maven 3.0.5 with a path setup

Getting the Source(top)

First, start by cloning the Spigot source, or your fork of the Spigot source.

Next, switch to whichever branch you wish to build off using "git checkout <branch>" (Master, snapshot, test branches, etc.)

Initiate an update of the downstream Bukkit and CraftBukkit builds via "git submodule update --init"

Once it has finished downloading, you can now apply the Spigot patches by executing the "./" file in the root of the source folder.

Once this is finished, you now have a full, ready to use copy of the spigot source under Spigot-Server and Spigot-API.

Building Spigot(top)

Once you have finished editing your changes in your IDE or text editing program of choice, go back the the root of the source and, using Maven, do a clean build ("mvn clean install") and let it run.

You can now find your custom Spigot build in ./Spigot/Spigot-Server/target/spigot-genericMinecraftVersion-GenericBukkitBuildVersion.jar

Creating a patch file for commit or local usage(top)

Go into the directory of whichever part of Spigot (API/Server) you made your changes to.

Bring your changed files to the stage and commit them locally.

Head back to the root directory and execute the ./ file.

You can now find your .patch in the relevant folder ((Craft)Bukkit-patches) within the root directory as the last patch file (assuming you did not play with time or use multiple commits.)