Fork me on GitHub

Building from Source

Content

Prerequisites

  • If you have an IDE installed such as NetBeans or Eclipse installed, it will make your development easier. However, follow on for the brave.

  • At least JDK 17 is required to compile and run the object code.

  • At least Apache Maven 3.3.9 is required to build the source files and assemble the project. More recent versions are fully supported.

Build Procedure

OpenNLP can either be build from the distributed sources or from a checkout of the git repository. These build instructions document how to build from the latest version of the main branch. The distributed source package includes a README file which explains how to build it.

On the first checkout everything should be built. Go to the opennlp folder inside the main branch and type

cd opennlp
mvn install

to build all modules.

The build installs the Maven artifacts in the local repository and creates a binary and source distribution inside the opennlp-distr/target folder.

After the initial build the individual modules can be built on their own with: mvn install

In the opennlp-docs folder it is recommended to always build with mvn clean install because changed docbook xml files might not be re-processed otherwise.

Skipping Tests

In some cases it might be convenient to skip the tests. That can be done with the -Dmaven.test.skip=true option. In this case, just execute:

mvn clean install -Dmaven.test.skip=true

No tests will be executed.

Reporting Problems

Note
It might happen from time to time that the build fails, if so please report a broken build on the opennlp-dev mailing list. The build should always work for everyone.