| h1. 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|features-maven-plugin-add]}} | 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|features-maven-plugin-generate]}} instead | |
| | {{[features:generate-features-xml|features-maven-plugin-generate]}} | Generates a features XML descriptor for a set of bundles | |
| | {{[features:validate|features-maven-plugin-validate]}} | Validate a features XML descriptor by checking if all the required imports can be matched to exports | |
| | {{|features:create-kar|features-maven-plugin-create-kar]}} | Create a KAR file from a features XML | |
| |
| h2. 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: |
| {pygmentize:xml} |
| <project> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.karaf.tooling</groupId> |
| <artifactId>features-maven-plugin</artifactId> |
| <version>${project.version}</version> |
| |
| <executions> |
| <!-- add execution definitions here --> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |
| {pygmentize} |