Showing posts from December, 2011

Coming in Karaf 3.0: new KAR service, command, management

We are working hard on Karaf 3.0. This major new version of Karaf will bring a lot of new features and enhancements. KAR in Karaf 2.2.4 As you may know, Karaf 2.2.x already provides “basic” KAR support. A KAR (KARaf archive) is a zip file which gathers a features XML and all bundles and configuration files dependencies. It means that a KAR is an atomic artifact which can be deployed without an Internet connection (as all is shipped in the KAR file itself). In Karaf 2.2.x, the KAR support was: a KAR deployer: you can copy a KAR file into the deploy folder, and KARAF will uncompress the KAR file, and install all features containing in the shipped features XML. a create-kar goal in the features-maven-plugin: this goal reads a features XML and creates a KAR file, ready to be deployed. So, all KAR logics were in the KAR deployer. It means that you are not able to deploy a KAR from a remote URL, etc. What’s coming in Karaf 3.0 The KAR service In Karaf 3.0, the KAR core bundle provides a org.

Overview on Apache Karaf, Pax Web, and Camel archetypes

In my previous blog post, I introduced the Karaf Maven plugins. The Karaf Maven plugins are really helpful, starting from an existing POM. If you can write this POM by hand (it’s my favorite way ;)), we also provide several archetypes which create and pre-configure a Maven project for you. Karaf Archetypes The next Karaf release (2.2.5) provides a set of new archetypes: Assembly Archetype The karaf-assembly-archetype create a Maven project which create a custom Karaf distribution. It allows you to create your own Karaf distribution. The project downloads a Karaf standard distribution (in tar.gz and zip formats), unpack it, and create a new distribution. The easiest way to use it is to use the interactive mode: mvn archetype:generate -DarchetypeGroupId=org.apache.karaf.archetypes -DarchetypeArtifactId=karaf-assembly-archetype -DarchetypeVersion=2.2.5-SNAPSHOT Bundle Archetype If basically a bundle is a jar file with some special statement in the MANIFEST, the easiest way to create a bun

Do you know the Apache Karaf Maven plugins ?

Apache Karaf is not only an OSGi container, it also provides a set of Maven plugins for tooling. In the next Apache Karaf 2.2.5 release, you will find two Maven plugins: cmdhelp-maven-plugin generates documentation (in DocBook or Scalate format) for Karaf commands features-maven-plugin provides a set of goals to manipulate Karaf features In this blog post, I will cover the features-maven-plugin as I think it’s the most interesting for your life with Karaf. Generate a features XML If I prefer to handle and create the features XML by hand, the features:generate-features-file goal could do it for you. It takes the dependencies of your project (described in the POM), and create the features XML. For instance, in the following example, a features XML file will be generated containing the commons-lang bundle: <xml version="1.0" encoding="UTF-8"?> <project xmlns="" xmlns:xsi="