Goal features:generate

The features:generate goal generates a features XML file for every bundle listed in the project's dependencies. In order to satisfy the required imports in these bundles, the plugin will add bundles:

  • bundles provided by Apache Karaf

  • a explicit list of bundles

  • bundles discovered in the POM's transitive dependencies

Afterwards, the generated file will be attached to the build as an additional build artifact (by default as group:artifact:version:xml:features).


The example below generates one feature that installs bundle mvn:org.apache:bundle1:1.0 in a features XML file called target/features.xml. It will find bundle in Apache Karaf 2.2.4, the transitive dependencies for this POM and the bundles listed in src/main/resources/bundles.properties.



Name Type Description
outputFile File Name of the features XML file that is being generated
Default value: /x1/asf/karaf-2.2.x/target/checkout/manual/target/classes/feature.xml
attachmentArtifactType String The artifact type for attaching the generated file to the project
Default value: {{xml})
attachmentArtifactClassifier String The artifact classifier for attaching the generated file to the project
Default value: features
kernelVersion String The version of Karaf that is used to determine system bundles and default provided features
bundles File A properties file that contains a list of bundles that will be used to generate the features.xml file