Title: Using Jena with Apache Maven [Apache Maven](http://maven.apache.org) is a tool to help Java projects manage their dependencies on library code, such as Jena. By declaring a dependency on the core of Jena in your project's pom.xml file, you will get the consistent set of library files that Jena depends on automatically added too. This page assumes you have Maven installed on your computer. If this is not the case, please read and follow [these instructions](http://maven.apache.org/download.html#Installation). ### Repositories Released maven artifacts are mirrored to the central maven repositories. This can take a few days. Development snapshots are available as well. [https://repository.apache.org/content/repositories/snapshots/](https://repository.apache.org/content/repositories/snapshots/) Stable Jena releases are automatically mirrored by the central Maven repositories, so there will normally be no need to add any extra repositories to your pom.xml or settings.xml. ### Specifying Jena as a dependency This is how to specify in your pom.xml file the dependency on a version of Jena: org.apache.jena apache-jena-libs pom X.Y.Z This will transitively resolve all the dependencies for you: `jena-core`, `jena-arq`, `jena-tdb` and `jena-iri` and their dependencies. Note the use of `pom` above. This does not work in all tools. An alternative is to depend on `jena-tdb`, which will pull in the other artifacts. org.apache.jena jena-tdb a.b.c Other modules need to be added separately, for example: org.apache.jena jena-text x.y.z Please check for the latest versions. ### Major Artifacts Jena provides a number of maven artifacts as delivery points. There are also a number of maven artifacts used as part of structuring Jena development.
Artifact ID Packaging (<type>) Description
apache-jena-libs pom A POM artifact that may be referenced to pull in all the standard Jena Libraries (Core, ARQ, IRI, and TDB) with a single dependency.
apache-jena pom The binary distribution
apache-jena-fuseki pom Fuseki2 distribution
apache-jena-osgi pom Jena as an OSGi bundle
jena-sdb jar SDB (SQL based triple store). SDB should only be used when there is an absolute requirement on using SQL. TDB is to be preferred.
jena The formal released source-released for each Jena release. This is not a maven-runnable set of binary files
jena-text jar SPARQL Text Search. Included in Fuseki.
jena-querybuilder jar A utility package to simplify the building of ARQ queries in code.
jena-elephas pom A collection of tools for working with RDF on the Hadoop platform
jena-fuseki-main war Fuseki packaged for embedding in an application.
jena-permissions jar Security wrapper around Jena RDF implementation.
jena-jdbc-driver-bundle jar A collection of JDBC drivers
There are also a number of artifacts used in development. The full list can be seen by browsing Maven [Released Jena artifacts](http://central.maven.org/maven2/org/apache/jena/) (This includes historic artifacts which are no longer active.) You can run mvn dependency:tree to print the dependency tree. ### Specifying dependencies on SNAPSHOTs If you want to depend on Jena development snapshots, e.g. to get access to recent bug fixes, you should add the following to your pom.xml: apache-repo-snapshots https://repository.apache.org/content/repositories/snapshots/ false true ### Build and install artifacts in your local Maven repository If you want you can checkout the Jena sources, build the artifacts and install them in your local Maven repository, then you simply checkout the source tree and build with maven mvn install. This assumes you have Maven and Git installed: git clone https://github.com/apache/jena/ cd jena mvn clean install Each of the modules can be built on its own but they require the current snapshots and Jena parent POM to be installed.