Coming in Apache Karaf 4.3.1: features JSON

The next Apache Karaf release (4.3.1) will support features definition in JSON format.

Up to now, only XML was supported. It’s now possible to use either XML or JSON format.

For instance, the following features repository using XML format:

<features name="my-features-repo" xmlns="">  <feature name="my-feature" version="1.0-SNAPSHOT">    <feature>scheduler</feature>    <bundle>mvn:org.example.bundle/my-bundle/1.0-SNAPSHOT</bundle>  </feature></features>

can now be defined using JSON format:

{  "name": "my-features-repo",  "feature": [    {      "name": "my-feature",      "version": "1.0-SNAPSHOT",      "feature": [        { "name": "scheduler" }      ]      "bundle": [        { "location": "mvn:org.example.bundle/my-bundle/1.0-SNAPSHOT" }      ]    }  ]}

In the Karaf runtime (or packaging), you can mix XML and JSON features repositories (it’s the same representation internally).

This is a preparation step for the “new” launcher and approach we are working for Karaf 5.


Popular posts from this blog

My first days at Huawei

Apache Karaf and log4j2 appenders

What's new in Apache Karaf 4.2.11 ?