Using the features-maven-plugin

The features-maven-plugin provides several goals to help you create and validate features XML descriptors as well as leverage your features to create a custom Karaf distribution.

Goal Description
features:add-features-to-repo Copies all the bundles required for a given set of features into a directory
(e.g. for creating your own Karaf-based distribution)
features:generate-features-file Deprecated - use features:generate-features-xml instead
features:generate-features-xml Generates a features XML descriptor for a set of bundles
features:validate Validate a features XML descriptor by checking if all the required imports can be matched to exports
{{features:create-kar

Configure the features-maven-plugin

In order to use the features-maven-plugin, you have to define the plugin in your project's pom.xml file:


<project>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>features-maven-plugin</artifactId>
        <version>2.2.11</version>

        <executions>
          <!-- add execution definitions here -->
        </executions>
      </plugin>
    </plugins>
  </build>  
</project>