BuildTools.jar is our solution to building Bukkit, CraftBukkit, Spigot, and the Spigot-API. All of which is done on your computer! A few prerequisite programs are necessary, but the instructions below will guide you through everything you need to do.

What follows below are the manual steps to get BuildTools running on Windows, if you want a one-click approach, click here (the "Tools" section).

Git - In order for BuildTools to run on Windows, you will need to install Git. For Windows it is distributed via git-scm, which can be downloaded here. Install it where you like, it will provide git bash, which will be used to run the BuildTools jar. Just keep hitting next when running the installer.Java - Download JRE 8 from here and install. Just keep hitting next when running the installer.

Java may need to be updated from the Apple distributed version, and even if previously updated, may need to be linked for shell use.
Please follow steps found here: https://gist.github.com/johan/10590467

If you wish to download this from the command line, use either curl -o BuildTools.jar <url> or wget -O BuildTools.jar <url> using the link described in the first step.

Spaces or exclamation points in the directory path may break BuildTools! It is recommended to remove these.

Open your terminal if you are on Linux, or git bash on Windows.

Git bash can be found on the desktop or in the Start menu under the name "git bash". It's also possible to open it by right-clicking on anything, as it is now an item in your context menu.

Navigate to where you downloaded BuildTools.jar, or use the command line way to download the jar to your current directory.

On Windows, you can either use the cd command to change directories, or you can right click the blank space of the folder where BuildTools.jar is (DO NOT click BuildTools.jar itself) and click "git bash", which will open it in your current directory.

Run BuildTools.jar from the terminal (Do not double-click BuildTools.jar) by doing the following:

On Linux run git config --global --unset core.autocrlf, then run java -jar BuildTools.jar in bash or another appropriate shell.

On Windows run the below command inside the git bash window that opened:

java -jar BuildTools.jar

Please be aware that it is required that you have BuildTools #35 or later, older versions will not work.

On Mac run the below commands,

export MAVEN_OPTS="-Xmx2G"java -Xmx2G -jar BuildTools.jar

Options (all OS's) :

The --revoption can be used to get specific 1.8/1.9 versions of CraftBukkit / Spigot

See Versions below for available options

(Optional) on Windows create a batch (.bat) file using this code to automate the install process:

This batch script will run java -jar BuildTools.jar in the git bash terminal giving you the ability to copy and paste it anywhere you please to run new builds. Just place the batch file in the same directory as the build tools and make sure the bashdir variable is correct (it may vary from C:\Program Files (x86)\ and C:\Program Files\ depending on your system architecture/operating system, and/or where you placed the program Git at.)

To change the version of the buildtools you want to use, change %bashdir% --login -i -c "java -jar ""%startdir%\BuildTools.jar""" to %bashdir% --login -i -c "java -jar ""%startdir%\BuildTools.jar"" --rev <version #>". This will tell buildtools what version you want to use. To always get an up-to-date version use --rev latest or use code listed above.

Wait as it builds your jars. In a few minutes you should have freshly compiled jars!

You can find CraftBukkit and Spigot in the same directory you ran the the BuildTools.jar in (craftbukkit-1.10.jar and spigot-1.10.jar). You can find Spigot-API in \Spigot\Spigot-API\target\ (spigot-api-1.10-R0.1-SNAPSHOT.jar).

BuildTools had trouble establishing a secure connection to the git repos, this is most likely due to your antivirus (Malwarebytes in particular) blocking the connection. Please whitelist https://hub.spigotmc.org in your AV program.

Spigot's applyPatches.sh says "/bin/bash^M: bad interpreter"

Spigot's applyPatches.sh says "line 2: $'\r': command not found"

This occurs on Linux (and occasionally Windows) when you have git's autocrlf enabled. To fix, run git config --global --unset core.autocrlf and re-pull/re-run BuildTools.

Ensure that you have write access to the directory you're running BuildTools in.

[ERROR] ... The import gnu.trove.... cannot be resolved

VIPRE antivirus has been known to cause this issue. It is possible that other antivirus software may also cause the same or similar issues. Disable the antivirus software and run BuildTools again.

If the issue persists after disabling the antivirus software, you may need to clear your local Maven repository by deleting the .m2 folder in your Windows user folder (Win+R and open %userprofile%), then perform a clean run of BuildTools (delete all of the files and folders it previously created before running it again).

There is a known issue with the 64-bit version of Git on Windows 10 that causes this error. Uninstall the 64-bit version of Git, then download and install the 32-bit version and re-run BuildTools.

[ERROR] Exception in thread "main" org.eclipse.jgit.api.errors.JGitInternalException: Invalid ref origin/master specified
This seems to happen at random. Delete all files created by BuildTools.jar and start over.

BuildToolsGUI is a user interface wrapper for BuildTools for Windows. It is compatible with Windows 7, 8, 8.1, and 10. It handles all of the dependencies to run BuildTools automatically. To use BuildToolsGUI you need to have .NET 4.5 installed on your Windows computer. If you have used your computer for a while, you probably already have it. If not, click here to install it.

BuildToolsGUI will automatically check for updates every time you run it. You can download it and find updates here. The source code to BuildToolsGUI can be viewed here.

If you continue to have issues getting BuildTools to run, you can ask on IRC or check the Tickets to see if your issue already exists.

Please note that it is recommended to move the compiled jar outside the BuildTools folder (to your server folder for example) to run your server. Not doing so could mess up buildtools folder in the future.