[rabbitmq-discuss] New patches for rabbitmq-java client OSGi compatibility

Holger Hoffstaette holger.hoffstaette at googlemail.com
Tue Jul 6 15:44:26 BST 2010


Hey!

I've respun my last year's OSGi integration to the latest 1.8 client
library, this time with the changes in a proper hg branch instead of
trampling all over default.. :)

Find it here in the "osgi" branch:
http://hoho.dyndns.org/hg/rabbitmq-java-client/

Things to know:

- it adds a processing step to the jar file generation using the "bnd"
utility [1] to add OSGi metadata to the generated library manifest. The
tool jar and metadata processing instructions are in the new "osgi"
subdirectory. There is no runtime code dependency; all this does is add a
bunch of headers to the jar's manifest.

- I updated the commons-io dependency to 1.4. This should not be a problem
to any clients as 1.4 is binary-compatible to the old one; however 1.4
(itself already over two years old) is the first one with valid OSGi
metadata itself. The client library itself is not affected by this. This
step is not strictly necessary as the OSGi runtime will properly resolve &
wire the needed dependency, but on the other hand pulling in ancient
dependencies is not that great either (e.g. when using maven).

- While I was there I also updated the retrotranslator & backport lib. I'm
not sure if the 1.4 backwards compatibility is something you want to
continue but it doesn't hurt either.

The bnd invocation is wired into the "jar" task. This OSGi-fication is
currently only done for the regular JDK5 jar, so the invocation of the
"bndwrap" task will also be have to be performed on the retrotranslated
jar, using 1.4-compatible bnd instructions (to pull in the
backport-concurrency lib). Let me know if this is of interest.

Also there seems to be an unneeded dependency on commons-cli in the maven
pom. commons-cli is only needed for the tests & tools.

All changesets are nicely grouped together, so you can cherry-pick what you
want.

cheers
Holger




More information about the rabbitmq-discuss mailing list