You can use the maven-resources-plugin to do this. Here is an example that will process the features.xml in src/main/feature directory to produce a KAR archive.
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/filtered-feature</outputDirectory>
<resources>
<resource>
<directory>src/main/feature</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>features-maven-plugin</artifactId>
<version>2.2.8</version>
<executions>
<execution>
<id>create-kar</id>
<goals>
<goal>create-kar</goal>
</goals>
<configuration>
<featuresFile>target/filtered-feature/feature.xml</featuresFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
--
View this message in context:
http://karaf.922171.n3.nabble.com/features-maven-plugin-plugin-create-kar-goal-using-Maven-variables-in-features-xml-tp4025231p4025232.html
Sent from the Karaf - User mailing list archive at Nabble.com.
