Apache Maven 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.
Released maven artifacts are mirrored to the central maven repositories. This can take a few days.
The Jena repositories at Apache are:
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
This is how to specify in your pom.xml file the dependency on a version of Jena:
<dependency> <groupId>org.apache.jena</groupId> <artifactId>apache-jena-libs</artifactId> <type>pom</type> <version>X.Y.Z</version> </dependency>
This will transitively resolve all the dependencies for you:
jena-iri and their dependencies.
Note the use of
<type>pom</type> above. This does not work
in all tools. An alternative is to depend on
jena-tdb, which will pull
in the other artifacts.
<dependency> <groupId>org.apache.jena</groupId> <artifactId>jena-tdb</artifactId> <version>a.b.c</version> </dependency>
The version number of TDB needs to be checked - it is not the same as apache-jena.
Other modules need to be added separately, for example:
<dependency> <groupId>org.apache.jena</groupId> <artifactId>jena-sdb</artifactId> <version>x.y.z</version> </dependency>
Please check for the latest versions.
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|
||A POM artifact that may be referenced to pull in all the standard Jena Libraries (Core, ARQ, IRI, and TDB) with a single dependency.|
||The binary distribution|
||Jena as an OSGi bundle|
||SDB (SQL based triple store). SDB should only be used when there is an absolute requirment on using SQL. TDB is to be preferred.|
||The formal released source-released for each Jena release. This is not a maven-runnable set of binary files|
||SPARQL Spatial Search. Included in Fuseki.|
||SPARQL Text Search. Included in Fuseki.|
||A simple CSV mapping to RDF and amenable to SPARQL|
||A collection of tools for working with RDF on the Hadoop platform|
||WAR file for Fuseki|
||Security (Permissions) wrapper around Jena RDF implementation.|
||maven-plugin||Maven Plugins, including schemagen|
||A collection of JDBC drivers|
||A utility package to simplify the building of ARQ queries in code.|
There are also a number of artifacts used in development. The full list can be seen by browsing Maven
You can run
mvn dependency:tree to print the dependency
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
<repository> <id>apache-repo-snapshots</id> <url>https://repository.apache.org/content/repositories/snapshots/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </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://git.apache.org/jena.git cd jena mvn clean install
Each of the modules can be built on it's own but they require the current snapshots and Jena parent POM to be installed.