Post: [How to] build & install the latest bukkit/craftbukkit build
09-21-2011, 05:15 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); After reading many posts by users upon this subject (mods ect.) I've decided to make a short tutorial upon it.

This will show you how to build the latest server; the 1.8.1 server is relatively unstable [now released officially, you can grab it here You must login or register to view this content. this tutorial will work with 1.9 before official release (while they update their git)

First you need to get the required pre-requests, these being;

  • Maven 3
  • Java sdk You must login or register to view this content.
  • Git from here You must login or register to view this content.
First install java sdk then git (win).(they should be easy enough (simple windows gui installers)
Then unzip maven 3 to a folder; for this tutorial we will use the root of drive C (C:/)
Maven 3 can be found here You must login or register to view this content.
Hopefully you've got this far Claps

Now we need to set up the environment variables in windows. (please note that i'm using server 2008 r2, but most other windows builds should be similar)

Right click 'computer' then left click 'properties'.
This should open up the system properties window.
Click 'advanced system settings' and under the advanced tab click 'environment variables';

You should get a window with two list boxes, check the bottom and top boxes for the variable JAVA_HOME, you shouldn't have one( well I didn't) so you need to create it under the current user variables. (You can probably use system variables for more than one user; but it may cause technical issues in the future.) Use the install directory of the java sdk as the value.

Next we need to set up maven there with the system's PATH enviroment variable;
First add Java to the path; add the /bin folder in the java directory to the path variable REMEMBER THE SEMICOLON
Next add Maven to the path; add the /bin folder in the maven directory to the path variable AGAIN REMEMBER THE SEMICOLON

Now that should be the hard bit over. :rolleyes:

Next we need to open up a new command prompt with elevated (administrative) privileges.

You will want to create a new folder where you want to download the bukkit source with:

mkdir 'dictionary name(obviously make it bukkit related'

We can the go to that dictionary with the cd command

cd ./'dictonary name'

Now we want to initialise git in your dictionary with

git init

then pull the code with git:

git pull git://github.com/Bukkit/Bukkit

now we can build it with maven (because the craftbukkit team like maven) with

mvn clean install

note : this may take a while (bout 5-10mins depending on how good the server is feeling) this is because your not only getting bits from git but also from maven required to build it. Be patient. After thats finished we can install craftbukkit:

Create your craftbukkit dictionary (note that ../ is up one level), an example being:

cd ../
mkdir 'relevant dictionary'
cd ./'that dictionary'

now we re initiate git in this new folder with:

git init

we get craftbukkit source with:

git pull git://github.com/Bukkit/CraftBukkit

and the install it with:

mvn clean package

Notice the different commands using mvn clean install will produce unexpected results!

Note now that the craftbukkit-0.0.1.jar is in the craftbukkit\target directory;
you can just launch it with a batch like:


@echo off
"%CD%\java\bin\java.exe" -Xincgc -Xmx1024M -jar craftbukkit.jar
pause

(that's a modified version of my current one)
Or just replace your current server jar (that's easier)

Hope this worked for you. :dingding:

Btw I didn't realise writing a tutorial was so hard, so sorry if it ain't too great.

UPDATE1:
Craftbukkit has been officially released (1185) for 1.8.1; currently this tutorial is not very useful.
Hopefully this will be of more use when 1.9 comes out.


UPDATE2:
Vanilla server 1.9 pre is out; craftbukkit has not been modified at the time of writing so check and don't waste your time.
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo