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="http://karaf.apache.org/xmlns/features/v1.4.0">  <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.

Comments

Popular posts from this blog

Quarkus and "meta" extension

Getting started with Apache Karaf Minho

Apache Karaf Minho and OpenTelemetry