$JAVA_HOMEpoints to it.
mvnis in your
$M2_HOMEpoints to its installation.
protocis on your
The REEF unit tests require a number of open files which is greater than the default open file limit on a number of Linux distributions such as Ubuntu 16.04/16.10. This limit is controlled in the shell by the “ulimit -n” command
The Java side of REEF is built using Apache Maven. All commands given below for building the code, running the tests or performing individual code quality checks can be used in two ways: when executed from the root directory of REEF project, they will build/run tests/checks on all Java projects in order of their dependencies, and when executed from an individual project's directory (for example,
/lang/java/reef-common), they will build/run tests/checks on that project only.
To build and run tests, execute:
mvn clean install
REEF integration tests can take a while (~30 minutes on a modern multi-core machine), it may be faster to run one of the commands below which skips these tests.
To perform build alone without tests in a multithreaded mode, execute:
mvn -TC1 -DskipTests clean install
To perform “fast” build, which skips tests and all code quality enforcement tools, execute:
mvn clean install -DskipTests -TC1 -P!code-quality
To run tests separately on local runtime, execute:
Note that the tests will take several minutes to complete. You will also see stack traces fly by. Not to worry: those are part of the tests that test REEF's error reporting.
Java build incorporates several code quality tools:
Apache RAT verifies that Apache headers are in place where needed. To run this check separately, execute:
Checkstyle verifies that all Java code adheres to a coding standard. To run this check separately, execute:
Per-project Checkstyle reports can be found at
\<project>\target\site\checkstyle.html. Violations which caused the build break will show up as errors and need to be fixed; violations which show up as warnings or info can be ignored.
Findbugs looks for potential bugs in Java code, and can fail the build if any high-priority warnings are found. To run this check separately, execute:
mvn findbugs:check xml:transform
Per-project Findbugs reports can be found at
We use Travis CI to run continuous integration for REEF Java code (i.e. build and run tests for all pull requests and commits to master branch). Our current setup runs 2 builds for each commit: Oracle JDK 8 and OpenJDK 7; REEF can run on Oracle JDK 7 but it has been dropped from Travis build images.
It can be convenient to set up Travis for your fork of REEF repository, for example, to reproduce a test failure which can't be reproduced locally.