Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions commons-rdf-jena/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,39 +51,36 @@
<artifactId>commons-rdf-simple</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Uncomment below and disable jena-osgi to access the regular non-osgi
Jena dependencies (e.g. for debugging) -->
<!--


<!-- Note: As commons-rdf-jena is an OSGi bundle, we'll need
the Jena OSGi bundle to calculate our OSGi package dependencies,
but leave it optional as it re-packages jena-arq below.
-->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<artifactId>jena-osgi</artifactId>
<version>${jena.version}</version>
<type>pom</type>
<scope>optional</scope>
</dependency>
-->

<!-- As commons-rdf-jena is an OSGi bundle, we'll use the Jena OSGi bundle -->
<!-- Note: For convenience of most Maven/Jena users
we'll keep this regular JAR dependency, but if
using us in OSGi context, add exclusion of jena-arq
and use only jena-osgi from above.
-->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-osgi</artifactId>
<artifactId>jena-arq</artifactId>
<version>${jena.version}</version>
<type>pom</type>
</dependency>

<!-- Additional bundles needed by jena-osgi -->
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.xerces</artifactId>
<version>${servicemix.xerces.version}</version>
</dependency>
<dependency>
<groupId>com.github.andrewoma.dexx</groupId>
<artifactId>collection</artifactId>
<version>${dexx.collection.version}</version>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons.compress.version}</version>
</dependency>


<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>commons-rdf-api</artifactId>
Expand Down
8 changes: 2 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,8 @@
is cross-compatible -->
<jsonldjava.version>0.11.1</jsonldjava.version>
<rdf4j.version>2.2.2</rdf4j.version>
<jena.version>3.5.0</jena.version>
<!-- NOTE: dexx and xerces versions should match
the versions marked as <optional> in jena-osgi pom
-->
<dexx.collection.version>0.7</dexx.collection.version>
<servicemix.xerces.version>2.11.0_1</servicemix.xerces.version>
<jena.version>3.9.0</jena.version>
<commons.compress.version>1.18</commons.compress.version>

<!-- Test dependencies -->
<slf4j.version>1.7.25</slf4j.version>
Expand Down
28 changes: 28 additions & 0 deletions src/site/markdown/implementations.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,34 @@ Objects created with [JenaRDF](apidocs/org/apache/commons/rdf/jena/JenaRDF.html

`JenaRDF` includes additional methods for converting from/to Apache Jena and Commons RDF, like [asRDFTerm(Node)](apidocs/org/apache/commons/rdf/jena/JenaRDF.html#asRDFTerm-org.apache.jena.graph.Node-) and [asJenaNode(RDFTerm)](apidocs/org/apache/commons/rdf/jena/JenaRDF.html#asJenaNode-org.apache.commons.rdf.api.RDFTerm-).

#### Jena and OSGi

If using `commons-rdf-jena` as an OSGi bundle, then you should use it together with the corresponding [`jena-osgi`](https://github.com/apache/jena/tree/master/apache-jena-osgi) artifact and exclude the `jena-arq` dependency. With Maven:

```xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-rdf-jena</artifactId>
<version>0.5.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-osgi</artifactId>
<version>3.9.0</version>
</dependency>
```

Make sure to exclude any other Jena dependencies (possibly in conflicting versions from transitive dependencies), as `jena-osgi` repackages them all into a single OSGi bundle.

<!-- TODO: Document how to do above with Karaf and jena-osgi-features -->


#### Generalized RDF

Apache Jena can support [generalized RDF](https://www.w3.org/TR/rdf11-concepts/#section-generalized-rdf), e.g.:
Expand Down