This page covers how to build DistributedLog 0.4.0-incubating from sources.

Build DistributedLog

In order to build DistributedLog you need the source code. Either download the source of a release or clone the git repository.

In addition you need Maven 3 and a JDK (Java Development Kit). DistributedLog requires at least Java 7 to build. We recommend using Java 8.

To clone from git, enter:

1
git clone https://github.com/apache/incubator-distributedlog

The simplest way of building DistributedLog is by running:

1
mvn clean package -DskipTests

This instructs Maven (mvn) to first remove all existing builds (clean) and then create a new DistributedLog package(package). The -DskipTests command prevents Maven from executing the tests.

Build

  • Build all the components without running tests
1
mvn clean package -DskipTests
  • Build all the components and run all the tests
1
mvn clean package
  • Build a single component: as distributedlog is using shade plugin. shade only run when packaging so pre-install the dependencies before building a single component.
1
2
mvn clean install -DskipTests
mvn -pl :<module-name> package [-DskipTests] // example: mvn-pl :distributedlog-core package
  • Test a single class: as distributedlog is using shade plugin. shade only run when packaging so pre-install the dependencies before building a single component.
1
2
mvn clean install -DskipTests
mvn -pl :<module-name> clean test -Dtest=<test-class-name>

Scala Versions

DistributedLog has dependencies such as Twitter Util, Finagle written in Scala. Users of the Scala API and libraries may have to match the Scala version of DistributedLog with the Scala version of their projects (because Scala is not strictly backwards compatible).

By default, DistributedLog is built with the Scala 2.11. To build DistributedLog with Scala 2.10, you can change the default Scala binary version with the following script:

1
2
3
4
# Switch Scala binary version between 2.10 and 2.11
tools/change-scala-version.sh 2.10
# Build with Scala version 2.10
mvn clean install -DskipTests

DistributedLog is developed against Scala 2.11 and tested additionally against Scala 2.10. These two versions are known to be compatible. Earlier versions (like Scala 2.9) are not compatible.

Newer versions may be compatible, depending on breaking changes in the language features used by DistributedLog's dependencies, and the availability of DistributedLog's dependencies in those Scala versions.