Goal features:create-kar
The features:create-kar goal creates a kar file from a given features XML.
A kar file is a zip archive shipping all bundles and configuration files containing in features of a features XML, and the features XML itself.
You can deploy a kar file just by copying it in the deploy folder, all resources will be loaded from the kar file.
Example
The example below generates a kar file from a given features XML. The generated kar will be in the target folder with the manual-2.4.5-SNAPSHOT.kar name.
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>features-maven-plugin</artifactId>
<version>2.4.5-SNAPSHOT</version>
<executions>
<execution>
<id>create-kar</id>
<goals>
<goal>create-kar</goal>
</goals>
<configuration>
<featuresFile>/home/jbonofre/Workspace/karaf/manual/src/main/resources/features.xml</featuresFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Parameters
Name | Type | Description |
---|
featuresFile | File | The features XML used to generate the KAR file Default value: /home/jbonofre/Workspace/karaf/manual/target/feature/feature.xml |
{{resourcesDir} | File | Location of resources directory for additional content to include in the KAR. Note that it includes everything under classes so as to include maven-remote-resources Default value: /home/jbonofre/Workspace/karaf/manual/target/classes}} |
finalName | String | Name of the generated kar Default value: manual-2.4.5-SNAPSHOT |
outputDirectory | File | Directory containing the generated archive Default value: /home/jbonofre/Workspace/karaf/manual/target |