If I use RDF4J with just Maven (no OSGi container), I'm able to utilize all the classes provided by RDF4J. But when I use RDF4J with OpenDaylight, the bundle in which I have used RDF4J classes does not start because of unsatisfied requirements. I'm using IntelliJ Idea and I created a new project with OpenDaylight archetype with groupId:org.opendaylight.controller, artifactId:opendaylight-startup-archetype, version:1.4.0-SNAPSHOT and repository:https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/archetype-catalog.xml
My package's group ID:org.exmaple, Artifact ID: rdfTest, version: 1.0-SNAPSHOT, I'm using maven 3.3.9
The archetype compiles successfully and I'm able to install all the features. (./karaf/target/assembly/bin/karaf and then installing features by feature:install command)
But when I add RDF4J dependency in pom.xml in impl folder
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-runtime-osgi</artifactId>
<version>2.2.2</version>
</dependency>
and add the following in RdfTestProvider.java in impl/src/main/java/org/example/impl, the feature does not install.
public void init() {
LOG.info("RdfTestProvider Session Initiated");
Repository rep = new SailRepository(new MemoryStore());
rep.initialize();
LOG.info("Repo successfully initialized");
}
I think the problem is that the RDF4J bundle is not getting installed. I tried different methods to install it, but none worked (installing 3rd party non-osgi bundles)
Is there any way to use RDF4J with OpenDaylight?