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.
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.4.5-SNAPSHOT</version>
<executions>
<!-- add execution definitions here -->
</executions>
</plugin>
</plugins>
</build>
</project>