The clerezza project to create a jena bundle is here:
https://svn.apache.org/repos/asf/incubator/clerezza/trunk/parent/ext.com.hp.hpl.jena/

for tdb:
https://svn.apache.org/repos/asf/incubator/clerezza/trunk/parent/ext.com.hp.hpl.jena.tdb/

compiled bundles can be found here:
https://repository.apache.org/content/repositories/snapshots/org/apache/clerezza/

Cheers,
reto

On Thu, Apr 7, 2011 at 3:31 AM, Paolo Castagna <
[email protected]> wrote:

> Hi Dave,
> not being an OSGi expert, this is what I've tried to do at the time in the
> Jena pom.xml file:
>
>    <profile>
>      <id>OSGi</id>
>      <build>
>        <plugins>
>          <plugin>
>            <groupId>org.apache.maven.plugins</groupId>
>            <artifactId>maven-jar-plugin</artifactId>
>            <version>2.2</version>
>            <configuration>
>              <archive>
>
> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
>              </archive>
>            </configuration>
>          </plugin>
>
>          <plugin>
>            <groupId>org.apache.felix</groupId>
>            <artifactId>maven-bundle-plugin</artifactId>
>            <extensions>true</extensions>
>            <executions>
>              <execution>
>                <goals>
>                  <goal>manifest</goal>
>                </goals>
>              </execution>
>            </executions>
>          </plugin>
>        </plugins>
>      </build>
>    </profile>
>
> However, as far as I remember, there wasn't a great deal of feedback about
> it.
>
> Ideally, if it is possible/easy to support people wanting to use Jena+ARQ
> via
> OSGi, why not?
>
> Paolo
>
>
> Dave Reynolds wrote:
>
>> 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
>>>
>>
>>
>>
>>
>

Reply via email to