$JAVA_HOME
points to it.mvn
is in your $PATH
and $M2_HOME
points to its installation.protoc
is on your PATH
.The Java side of REEF is built using Apache Maven. To build and run tests, execute:
mvn clean install
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:
mvn test
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:
mvn apache-rat:check
Checkstyle verifies that all Java code adheres to a coding standard. To run this check separately, execute:
mvn checkstyle:checkstyle
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 \<project>\target\findbugs\findbugsXml.html
.
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).
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.