OWL API Source

The OWL API source code is contained in a subversion repository on sourceforge.

The latest OWL API (for OWL 2) may be checked out of subversion with the following command:

svn co https://owlapi.svn.sourceforge.net/svnroot/owlapi/owl1_1/trunk

Building with ANT

The API includes ANT build files. In order build with ANT, you must have a working ANT installation. For details on downloading and installing ANT please visit the ANT website. In a terminal window change to the antbuild directory in the directory where you checked out the OWL API. Type the following to build jar files for the source and binary code.
ant
This will create a build directory in the antbuild directory that contains an owlapi-bin.jar which contains the OWL API class files, and owlapi-src.jar containing the source code and javadoc directory containing javadoc of the public interfaces.
antbuild

Building in an IDE

In order to build the API using an IDE, you can simply include the java directory for each module in the source path in your IDE. You will also need to ensure that the commons-lang library is in your class path - you can obtain a copy of commons-lang here.

Building with Maven

The API includes Maven build files (the pom.xml files). In order to build the API with Maven, you must have a working Maven installation. For details on downloading and installing Maven please visit the Maven website. Once you have a working Maven installation you can produce a set of OWL API jars by changing to the directory where you checked out the OWL API (usually the trunk directory) and typing the following

mvn package assembly:assembly

The OWL API jar files will be created and zipped up and placed in a directory called target.

The layout of API directories corresponds to a Maven build structure, but is relatively simple. The OWL API consists of several modules, such as api, impl, rdfxmlparser, functionalsyntax parser etc. Inside each of these modules the source code can be found inside the src/main/java directory - an example is shown below.