BuildTools
BuildTools
  • Spigot updater (macOS)
    BuildTools

    Simple instructions to build CraftBukkit and Spigot


    Contents
    top)
    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.

    top)
    There are two applications necessary to use BuildTools: Git and Java.

    top)
    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.
    The very latest versions of BuildTools will automatically download and install Git for you. Only grab it manually if you are having troubles!

    Java - Download JRE 8 from here and install. Just keep hitting next when running the installer.

    top)
    Both git and Java, as well as util commands, can be installed using a single command via your package manager.
    Debian/Ubuntu: sudo apt-get install git openjdk-7-jre-headless
    CentOS/RHEL: sudo yum install git java-1.7.0-openjdk-devel
    Arch: pacman -S jdk8-openjdk git

    top)
    Git can be downloaded from: http://sourceforge.net/projects/git-osx-installer/files/

    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

    top)
    1. Download BuildTools.jar from https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar.
      1. Keep watch on https://hub.spigotmc.org/jenkins/job/BuildTools for any bug fixes and updates
      2. 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.
      3. Spaces or exclamation points in the directory path may break BuildTools! It is recommended to remove these.
    2. Open your terminal if you are on Linux, or git bash on Windows.
      1. 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.
    3. Navigate to where you downloaded BuildTools.jar, or use the command line way to download the jar to your current directory.
      1. 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.
    4. Run BuildTools.jar from the terminal (Do not double-click BuildTools.jar) by doing the following:
      1. On Linux run git config --global --unset core.autocrlf, then run java -jar BuildTools.jar in bash or another appropriate shell.
      2. On Windows run the below command inside the git bash window that opened:
        1. java -jar BuildTools.jar
        2. Please be aware that it is required that you have BuildTools #35 or later, older versions will not work.
      3. On Mac run the below commands,
        1. export MAVEN_OPTS="-Xmx2G"
          java -Xmx2G -jar BuildTools.jar
      4. Options (all OS's) :
        • The --rev option can be used to get specific 1.8/1.9 versions of CraftBukkit / Spigot
        • See Versions below for available options
    5. (Optional) on Windows create a batch (.bat) file using this code to automate the install process:
      1. Code (Text):
        @Echo off
        set startdir=%~dp0
        set bashdir="C:\Program Files (x86)\Git\bin\bash.exe"
        %bashdir% --login -i -c "java -jar ""%startdir%\BuildTools.jar"""
        pause
      2. 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.)
      3. 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.
    6. Wait as it builds your jars. In a few minutes you should have freshly compiled jars!
    7. 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).
    8. Enjoy your new server!
      1. Need help getting started running the server? Look here: Getting Started
    top)
    Versions of spigot can be generated by using --rev and the version you are trying to get. Below are supported methods to use in BuildTools.
    top)
    • Code (Latest Version):
      java -jar BuildTools.jar --rev latest
      • Will build the latest stable CraftBukkit and Spigot jar (can remove --rev and will generate latest version)
      • Currently 1.12.1
      • Change Log: Check 1.12.1
    top)
    • Code (Version 1.12.1):
      java -jar BuildTools.jar --rev 1.12.1
      • Will build a CraftBukkit and Spigot jar for 1.12.1
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.12):
      java -jar BuildTools.jar --rev 1.12
      • Will build a CraftBukkit and Spigot jar for 1.12
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.11):
      java -jar BuildTools.jar --rev 1.11
      • Will build a CraftBukkit and Spigot jar for 1.11
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.10):
      java -jar BuildTools.jar --rev 1.10
      • Will build a CraftBukkit and Spigot jar for 1.10
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.9.4):
      java -jar BuildTools.jar --rev 1.9.4
      • Will build a CraftBukkit and Spigot jar for 1.9.4
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.9.2):
      java -jar BuildTools.jar --rev 1.9.2
    top)
    • Code (Version 1.9):
      java -jar BuildTools.jar --rev 1.9
      • Will build a CraftBukkit and Spigot jar for 1.9
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.8.8):
      java -jar BuildTools.jar --rev 1.8.8
      • Will build a CraftBukkit and Spigot jar for 1.8.8
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.8.7):
      java -jar BuildTools.jar --rev 1.8.7
      • Will build a CraftBukkit and Spigot jar for 1.8.7
      • Change Log: Mojang | Stash | Jenkins
    top)
    • Code (Version 1.8.3):
      java -jar BuildTools.jar --rev 1.8.3
    top)
    • Code (Version 1.8):
      java -jar BuildTools.jar --rev 1.8
      • Will build a CraftBukkit and Spigot jar for 1.8
      • Change Log: Mojang | Stash | Jenkins
    top)
    • There's an error regarding jacobe.exe or jacobe being missing from BuildData/bin
      • Update BuildTools.jar
    • Buildtools gives the error "java.io.FileNotFoundException: BuildData/mappings/bukkit-1.8-cl.csrg"
      • Update to the latest BuildTools to fix this issue
    • Exception in thread "main" org.eclipse.jgit.api.errors.TransportException
      • 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.
    • Spigot's applyPatches.sh says "fatal: sha1 information is lacking or useless"
    • Spigot's applyPatches.sh says "Patch failed at ..."
      • This occurs on Windows if git's autocrlf is set to false (or unset). To fix, run git config --global --replace-all core.autocrlf true and re-pull/re-run BuildTools
      • If on linux, run git config --global --unset core.autocrlf and re-pull/re-run BuildTools.
    • Failed to create log file: BuildTools.log.txt
    • Exception in thread "main" org.eclipse.jgit.api.errors.JGitInternalException: Creating directories...
      • 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).
    • (for Windows 10 users) fatal error in forked process - fork: can't reserve memory for parent stack
      • 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.
    • (for Mac OS X 10.11 El Capitan users) xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      • El Capitan breaks Xcode installs if you've upgraded from a previous version of OS X. To fix this, run xcode-select --install and re-pull/re-run BuildTools.
    • Git bash for Windows won't let me select text
      • Right click the top left corner of git bash > properties > enable QuickEdit mode > OK
      • Left click drag to select, right click once to copy.
      • You can also right click once to paste
    • Can I build this on a CI server?
    • java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      • You are missing Java certificates on your server, or a firewall / antivirus is blocking your connection.
      • Install ca-certificates-java or run with the --disable-certificate-check argument.
    top)
    These tools below are created by the following community members. They are not supported by SpigotMC in any way, shape, or form. If you have issues, please follow the official instructions above.
    top)
    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.

    top)
    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.
BlackSpigot General Chat
Rules Help Users
    Fuck-Skidders.Club @ Fuck-Skidders.Club: I've been waiting for over a week
    Top