How To Build Cassandra

Current Trunk Version

Toolchain requirements:

Tool

Version

Java SDK

1.7 (preferably the latest)

ANT

At least version 1.8

GIT

1.7

To build the latest version of Cassandra from Git:

git clone git://git.apache.org/cassandra.git cassandra
cd cassandra
# if directly connected to the internet
ant
# if connected via a proxy
ant -autoproxy

To update cloned repository with recent commits:

git pull

To build the specific release of Cassandra from the cloned Git repository:

# find a tag for the release you need
git tag

# checkout source files for the release
git checkout <tag_for_the_release>

# for example, if you need to checkout 2.0.4 release
git checkout cassandra-2.0.4

# if you need to checkout the latest files again
git checkout trunk

# if directly connected to the internet
ant
# if connected via a proxy
ant -autoproxy

Older versions

Toolchain requirements:

Cassandra version

Java SDK

GIT

ANT

2.0

1.7

1.7

At least version 1.8

1.2 and older

1.6

1.7

At least version 1.8

To build diffrent Cassandra versions from Git you need to specify the version via git's branch option:

git clone -b <cassandra_version> git://git.apache.org/cassandra.git cassandra
# e.g for 1.2: git clone -b cassandra-1.2 git://git.apache.org/cassandra.git cassandra
# e.g for 2.0: git clone -b cassandra-2.0 git://git.apache.org/cassandra.git cassandra
cd cassandra
# if directly connected to the internet
ant
# if connected via a proxy
ant -autoproxy

You can find the diffrent branches representing Cassandra versions via:

git branch -a

Building Tools

To build the cassandra-stress tool

ant stress-build	

Troubleshooting

If the above instructions don't work for you:

  1. Have you checked that your version of ANT meets the minimum required version?
    1. On RH/Centos systems you may need additional ant dependencies, try running: yum install ant ant-apache-*
  2. Have you checked that you are actually using the correct version of Java?
  3. Do you have an internet connection? The build has to download Maven ANT Tasks (or Ivy for older builds) and the download all the required build dependencies. If you don't have an internet connection, or if ANT cannot determine your proxy configuration then the build will fail.

https://c.statcounter.com/9397521/0/fe557aad/1/|stats

  • No labels