OpenDJ 3 build has been migrated from Ant to Maven starting from revision 11702 (February, 10 2015).
The OpenDJ server is now located under the master branch as the opendj-server-legacy module (use git with a community login):
Although it is still possible to run some ant tasks, a full build can't be done any more using Ant, due to incompatible changes related to messages properties files.
Minimum requirement is Apache Maven 3.0.4
If you have a version already installed and previously built with Ant, run a clean to ensure all generated classes are deleted:
You can either build from
trunk/opendj (do it at least once when starting) or directly from
trunk/opendj/opendj-server-legacy (once you have built the complete opendj project, provided that not dependent changes occured in another maven sub-module)
Build the project (Note: it does not run the tests for
Build with precommit (includes checkstyle, copyright check, running tests)
Only update the copyright dates of modified files
Regenerate messages and configuration classes (does not re-compile)
opendj-server-legacytests are run in the integration-test phase (not the test phase) because a lot of them requires a running server.
Options to run the tests:
The full documentation of failsafe plugin, used behind the scene to run TestNG tests, is available here: http://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html
If you want to debug the test, add the following option to the maven command line: "
-Dmaven.failsafe.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE""
If you only want to run the tests, see the Also see forgerock community forum: https://forgerock.org/topic/how-to-_only_-run-tests
Build with SNMP
Working with an IDE
When you're using Maven in an IDE you often find the need for your IDE to resolve source code and Javadocs for your library dependencies.
There's an easy way to accomplish that goal:
Running slow tests
opendj-server-legacy/pom.xml, remove or comment the following lines from maven-failsafe-plugin configuration:
And then run: