incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Castagna <>
Subject Re: Jena as OSGi bundle?
Date Tue, 16 Nov 2010 21:33:18 GMT
On 16 November 2010 15:19, Reto Bachmann-Gmuer
<> wrote:
> Hi Paolo
> Would be great if Jena culd natively be run in an osgi container.


> Why would you like to keep the packaging value "jar" in the pom?

Perhaps, it's just me not fully understand what <packaging>bundle</packaging>
actually does and what are the consequences for people not using OSGi if we
change from "jar" to "bundle". I guess the answer is: none. But, a confirmation
on this would be good.

> I think it should be possible to associate the bundle (or bundleall)
> goal of the maven-bundle-plugin to the defaukt packaging phase, but I
> think its easier to use packaging "bundle".

I will try to see how it goes and if there are other plug-ins which might
be influenced by the jar --> bundle change.

> Another thing to consider is if some depenendencies have to be
> included in the jar, the current clerezza bundle contains most
> dependencies as we didn't find them as bundles, however having the
> dependencies in the jar is not useful outside the context of osgi (I
> think). It might worth considering having a jena jar without
> dependencies and one with. The first could only use in a container
> where all required packages are exported by other bundles.

Ok, so this is an important difference to consider.

We would need to have two jars.

Could your or someone from clerezza help me to see how we might do this?
Would you do it via the assembly.xml file?
Do you have an example of pom.xml|assembly.xml file doing this
"double" packaging, one for OSGi and one 'usual' jar?


> Cheers,
> Reto
> On Mon, Nov 15, 2010 at 8:27 PM, Paolo Castagna
> <> wrote:
>> Hi,
>> sorry for the 'intrusion', I have one question about OSGi and Jena.
>> I saw you have a pom.xml [1] to group all the Jena artifacts and
>> dependencies in a OSGi bundle.
>> While ago I tried to provide support for people wanting to use Jena as
>> a OSGi bundle (however, I am not an OSGi expert myself and I am not
>> sure that was enough).
>> Is there something we can do in Jena to provide you with a jar which
>> gets you everything you need in relation to Clerezza and the OSGi
>> framework?
>> In particular, would having this in the Jena pom.xml help you?
>> <plugin>
>>  <groupId>org.apache.felix</groupId>
>>  <artifactId>maven-bundle-plugin</artifactId>
>>  <extensions>true</extensions>
>>  <configuration>
>>    <instructions>
>>      <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
>>      <Embed-Dependency>*;artifactId=!commons-logging</Embed-Dependency>
>>      <Embed-Transitive>true</Embed-Transitive>
>>      <Import-Package>!com.hp.hpl.jena.*.test,
>>            !org.apache.xml.resolver.*,!sun.*,
>>            !com.sun.msv.*,
>>            !com.sun.jdmk.*,
>>            !javax.jms.*,
>>            !org.relaxng.*,
>>            *</Import-Package>
>>      <Export-Package>com.hp.hpl.jena.*,
>>            org.apache.xerces.util</Export-Package>
>>    </instructions>
>>  </configuration>
>> </plugin>
>> And, would it work with <packaging>jar</packaging>?
>> Ditto for TDB [3].
>> Thank you in advance for your help.
>> Paolo
>>  [1]
>>  [2]
>>  [3]

View raw message