Using the karaf-maven-plugin
The Karaf Maven plugin allows you:
* to work with Karaf features: validate a features descriptor, add features bundle into a repository, create a KAR archive from a features descriptor, etc.
* to create Karaf commands help: it generates help from Karaf commands
* to modify Karaf instances and create distributions
The most generally useful features of the karaf-maven-plugin are exposed as packagings. To use the packagings the pom or an ancestor must configure the karaf-maven-plugin with extensions:
Then specify the packaging in your project as usual, e.g.
The karaf-maven-plugin is able to generate documentation for Karaf commands:
Normally you should use the features or kar packagings instead of these individual goals.
The karaf-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.
Instances and distributions goals
Normally you should use the karaf-assembly packaging instead of this individual goal.
The karaf-maven-plugin helps you to build custom Karaf distributions or archives existing Karaf instances:
| Goal || Description |
| karaf:install-kars || Assemble a server from Maven feature-repo and kar dependencies. Used in karaf-assembly packaging. See karaf-assembly. |
| karaf:instance-create-archive || Package a server archive from an assembled server. . Used in karaf-assembly packaging. See also karaf-assembly.|
| karaf:features-add-to-repository || (old style manual assemblies) Copies all the bundles required for a given set of features into a directory |
(e.g. for creating your own Karaf-based distribution)