Skip to content
purplefox edited this page Jul 26, 2012 · 21 revisions

How to build vert.x from source.

Important Note: If you want a stable release, use a binary distribution, or build from source using a tag from one of our official releases. If you build from master absolutely zero guarantees are made as to whether the code will work or not. master is for the state of the latest development, it is NOT supposed to be stable

First clone the repository:

git clone git@github.com:vert-x/vert.x.git

Then checkout the tag you want (you can list them with git tag -l)

git checkout <tag_name>

(Omit the checkout if you are brave and want to build from master)

Pre-requisites

  • Operating system: vert.x currently runs on Linux, OSX and Windows.
  • JDK, version 1.7.0 or later. You can use OpenJDK or the official Oracle JDK. Make sure the JDK bin directory is on your PATH.
  • JRuby is installed and JRUBY_HOME is set. You will need to install the json gem: jruby -S gem install json. [Note for OSX users. Best to install JRuby in your home directory. Installing it in a shared directory via a package manager seems to have issues when installing gems]
  • Yard, for building the Ruby API documentation. To install yard, it's easiest to install it using MRI (not using jruby) - install ruby and rubygems and then gem install rdiscount and gem install yard

Gradle build

The build uses Gradle. You don't have to install it (or Groovy), the build script will automatically handle that for you.

You use the mk script to execute build tasks (or wmk.bat on Windows).

For a list of all tasks type ./mk task (or wmk.bat task on Windows).

Here are a few of the more important ones:

To build the various jars:

./mk jar (or wmk.bat jar)

The jars will end up in the build/libs' directory of the relevant sub project (vertx-core, vertx-platform`).

To build a distribution

./mk dist (or wmk.bat dist)

Once you have the distro, follow the instructions on the website for installing it.

To run tests

To run all tests

./mk test (or wmk.bat test)

To run a single test

./mk test -Dtest.single <test name> (or wmk.bat test -Dtest.single <test name)

Clone this wiki locally