Mark Ashworth

Designing applications, writing, photography and reading



Installing Apache Karaf features behind a firewall

Apache Karaf can either use :-

  • the proxy settings in the Maven settings.xml in the specific user’s .m2 directory running the Karaf instance
  • the proxy settings in the global settings.xml in the conf directory of the Maven installation
  • the mvn repository can be changed within Karaf to include a local Maven repository like Sonatype Nexus

To use the settings.xml file, specify the following in the file in the global conf directory or in the user’s .m2 directory.

<host>hostname or ip</host>

The approach that I prefer is to add the Sonatype Nexus public url to the list of repositories that Apache Karaf should use when resolving features. This allows all the developers in a team to utilize the same shared resource for resolving artifacts. Open the ${karaf install folder}\etc\org.ops4j.pax.url.mvn.cfg file and add the url to the org.ops4j.pax.url.mvn.repositories config item.

org.ops4j.pax.url.mvn.repositories= \
http://localhost:9091/nexus/content/groups/public, \, \, \, \
file:${karaf.home}/${karaf.default.repository}@id=systemrepo, \

OSGi enabled LMAX Disruptor

A friend of mine,John Steinberg, introduced me to the high performance currency framework LMAX Disruptor. In a recent project I wanted to use the Disruptor as an OSGi bundle that my application could make use of but the MANIFEST.MF supplied with the library just contained the default build information.

I have contributed a patch that adds the relevant bundle information, but if you would like LMAX Disruptor 2.9 built library with the OSGi information then have a look here. I did get confirmation from the LMAX Disruptor developers that the patch has been committed and will be available in the next release.

Below is a screen shot of Apache Karaf with the LMAX Disruptor deployed.

Apache Karaf showing deployed Disruptor bundle

Create a free website or blog at

Up ↑