Hi Nikolaos, Topical, I'm just in the middle of some experimental OSGi work which involves Jena :)
I'm not sure where the Paolo/Clerzza discussions are at but I've found it easy to create a Jena bundle locally. Just create a separate pom.xml file which pulls in jena+arq from maven and builds a single bundle (see below) then mvn package will create a usable bundle in the ./target I've based this on the arq rather than jena artifact so as to get a single bundle of jena including arq which matches the normal jena packaging. The resulting bundle works for me in that I can write bundles which create and output jena models using this with no glitches. What linkage problems did you find? Does the above approach solve them? I don't think there's any project agreement on whether to create a jena bundle as part of the standard build process and if so how to do that while still supporting the current packaging[*]. But I would be happy to support a move in that direction. Dave [*] Given the problem of maven only allowing one packaging I wonder if the easiest thing would be to invoke bnd during the assembly phase since the maven bundle plugin is just a layer over bnd. [[[ pom.xml ]]] <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.hp.hpl.jena</groupId> <artifactId>jena-osgi</artifactId> <version>2.6.4</version> <name>Jena OSGi</name> <description>OSGi bundling of Jena and its internal dependencies.</description> <packaging>bundle</packaging> <repositories> <!-- jena-repo is mirrored to Maven central repository --> <!-- In case mirroring has not happened yet ... --> <repository> <id>repo-jena</id> <name>Jena Maven - Repository</name> <layout>default</layout> <url>http://openjena.org/repo</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <dependencies> <dependency> <groupId>com.hp.hpl.jena</groupId> <artifactId>arq</artifactId> <version>2.8.7</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <!-- Defaults for name and symbolic name created by bundle-plugin --> <Embed-Dependency>*;artifactId=!commons-logging</Embed-Dependency> <Embed-Transitive>true</Embed-Transitive> <Import-Package> !org.apache.xml.resolver.*,!sun.*, !com.sun.jdmk.*,!com.sun.msv.*,!org.relaxng.*, !javax.jms.*,!javax.mail.*,!javax.swing.*,!javax.management,!javax.naming, *</Import-Package> <Export-Package>com.hp.hpl.jena.*, org.apache.xerces.util</Export-Package> </instructions> </configuration> </plugin> </plugins> </build> </project> On Wed, 2011-04-06 at 09:49 -0700, Nikolaos Abatzis wrote: > All, > > I googled and found some email threads between Paolo and the folks at > Clerezza regarding creating an OSGi bundle for Jena. > > Are there any news on this, as we are using Jena in an OSGi environment and I > am coming across linkage errors due to class loading issues? > > > > Please do not hesitate to contact me if you need additional information. > Thank you. > > Regards, > > Nikolaos Abatzis > New River Systems Corporation > 1890 Preston White Drive, Suite 24linkage error > Reston, VA 20191
