Goal features:validate
The features:validate goal validates a features XML descriptor by checking if all the required imports for the bundles defined in the features can be matched to a provided export.
By default, the plugin tries to add the Karaf standard features (standard and enterprise) in the repositories set.
It means that it's not necessary to explicitly define the Karaf features descriptor in the repository section of your features descriptor.
Example
The example below validates the features defined in the target/features.xml by checking all the imports and exports. It reads the definition for the packages that are exported by the system bundle from the src/main/resources/config.properties file.
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>features-maven-plugin</artifactId>
<version>2.4.5-SNAPSHOT</version>
<executions>
<execution>
<id>validate</id>
<phase>process-resources</phase>
<goals>
<goal>validate</goal>
</goals>
<configuration>
<file>target/features.xml</file>
<karafConfig>src/main/resources/config.properties</karafConfig>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.4.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Parameters
Name | Type | Description |
---|
file | File | The features XML descriptor file to validate. Default value: /home/jbonofre/Workspace/karaf/manual/target/classes/features.xml |
karafConfig | String | The Karaf config.properties file to use during the validation process Default value: config.properties |
jreVersion | String | The JRE version that is used during the validation process Default value: {{jre-1.5}) |
karafVersion | String | The target Karaf version used to get the Karaf core features (standard and enterprise) Default value is the version of the plugin |
repositories | String[] | Additional features XML descriptors that will be used during the validation process |