Building Titan - andrew-nguyen/titan GitHub Wiki

To build Titan you need git and Maven.

  1. Clone the Titan repository from GitHub to a local directory.
  2. In that directory, execute mvn clean install. This will build Titan and run the internal test suite. The internal test suite has no external dependencies. Note, that running all test cases requires a significant amount of time. To skip the tests when building Titan, execute mvn clean install -DskipTests
  3. For comprehensive test coverage, execute mvn clean test -P comprehensive. This will run additional test covering communication to external storage backends, performance tests and concurrency tests. The comprehensive test suite uses Cassandra and HBase as external databases and requires that Cassandra and HBase are installed. Note, that running the comprehensive test suite requires a significant amount of of time (> 1 hour).

Depending on Titan Snapshots

For developing against the most current version of Titan, depend on Titan snapshot releases. Note, that these releases are development releases and therefore unstable and likely to change. Unless one is interested in the most recent development status of Titan, we recommend to use the stable Titan release instead.

<dependency>
   <groupId>com.thinkaurelius.titan</groupId>
   <artifactId>titan-core</artifactId>
   <version>X.Y.Z-SNAPSHOT</version>
</dependency>

Check the master branch for the most current release version.
SNAPSHOTs are available through the Sonatype repository.

When adding this dependency, be sure to add the following repository to the pom.xml:

<repository>
  <id>sonatype-nexus-snapshots</id>
  <name>Sonatype Nexus Snapshots</name>
  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  <releases>
    <enabled>false</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

Building Distributions without Gollum

# Build and install code artifacts
cd titan # or whatever your clone directory is named
mvn clean install -DskipTests=true

# Build and install Cassandra's test artifact
cd titan-cassandra
mvn clean install -Paurelius-release -Dgpg.skip=true -DskipTests=true
cd ..

# Install a fake titan-site in the local Maven repository
touch emptyfile ; zip empty.zip emptyfile
mvn install:install-file -DgroupId=com.thinkaurelius.titan -DartifactId=titan-site -Dversion=0.4.0-SNAPSHOT -Dclassifier=htdocs -Dpackaging=zip -Dfile=empty.zip
rm empty.zip

# Build distributions *without documentation* -- not suitable for release
cd titan-dist
mvn clean install -Paurelius-release -DskipTests=true -Dgpg.skip=true

It’s preferable to install gollum-site through rubygems, if possible, before building the release distributions, but this should work if you don’t want to install gollum-site.

FAQs

1. Maven build causes dozens of “[WARNING] We have a duplicate…” errors
Make sure to use the maven-assembly-plugin when building or depending on Titan. Please refer to the following ticket for more information

⚠️ **GitHub.com Fallback** ⚠️