incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <>
Subject Re: OSGi metadata for ODFDOM
Date Tue, 20 Sep 2011 10:18:20 GMT
Hi Svante

An easy way to test the bundle manually is to install Apache Karaf [1]
(very quick) and drop odfdom.jar in Karaf's deploy directory. You'll
also need a OSGi-fied Xerces bundle [2] so the OSGi framework can
resolve that dependency. On Karaf's console you can say "list" and if
ODFDOM shows "Active", the bundle is likely to be fine. Obviously, that
doesn't tell you whether the bundle actually works (OSGi-specific class
loading problems and such).

I don't know Maven enough to say directly how you could do it, but I
think there is Maven support for Pax Exam [3] which could be used to do
that check as a unit test. I'm sure the Felix/Karaf/Aries communities
could help with that.

Anyway, I'm switching to the new Maven-built bundle now from my own
custom-built one. So I should know rather quickly if something doesn't


On 19.09.2011 20:49:19 Svante Schubert wrote:
> Hi Jeremias,
> thanks for the quick patch.
> Is there any way to check if an OSGi is a valid OSGi? Can we add some
> regression test?
> Just a quick note on the current sources.
> Even before the patch, ODFDOM does not build due to a Javadoc memory
> issue. It can be fixed by editing
>     /trunk/odfdom/pom.xml (the same file Jeremias edited):
> Change the Java version from JDK 5 to JDK 6. We switched to JDK 6 to new
> encryption / security features.
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <source>1.6</source>
>                     <target>1.6</target>
> Reduce the memory for the JavaDoc plugin and update the version:
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-javadoc-plugin</artifactId>
>                 <version>2.8</version>
>                 <configuration>
>                     <doctitle>ODFDOM</doctitle>
>                     <minmemory>128m</minmemory>
>                     <maxmemory>1024m</maxmemory>   
> After this the build should run smoothly.
> The following is redundant and should be removed:
> The directory
>     /trunk/validator/test
> All .hgeol files
>     /trunk/generator/.hgeol
>     /trunk/odfdom/.hgeol
>     /trunk/simple/.hgeol
>     /trunk/validator/.hgeol
> Best regards,
> Svante
> Am 19.09.2011 17:28, schrieb Jeremias Maerki:
> > I've chatted with Svante earlier today and we happened to talk briefly about
> > OSGi. I'm using ODFDOM in an OSGi system, so I'm interested that the JAR
> > includes OSGi metadata from the start. Since the issue tracker isn't
> > available, yet, I'm posting my patch here.
> >
> > I expect the OSGi part to change slightly as you'll move from
> > org.odftoolkit to org.apache but that should be a no-brainer even for
> > someone without knowledge about OSGi.
> >
> > While doing the change, I noticed that odfdom-jar-with-dependencies.jar
> > loses the Manifest data compared to odfdom.jar. That is so even without
> > my changes. Please note that the single JAR would need different OSGi
> > metadata. It can't just be copied over to the assembly. Well, it
> > probably can but it beats the purpose of the assembly since it would
> > still look for Xerces outside of it own bundle.
> >
> > Jeremias Maerki (ICLA on file)

Jeremias Maerki

View raw message