Thanks guys, that's exactly what I was looking for.
Regards
Laci
On 05.02.2014 18:40, Charlie Mordant wrote:
Hi,
I made approximately the same thing, but in a way different (using
resource filtering and buildhelper): e.g:
https://github.com/Tcharl/net.osgiliath.features.karaf-features/blob/master/net.osgiliath.features.karaf-features-functional/pom.xml
Regards,
2014-02-05 Richard Kettelerij <[email protected]
<mailto:[email protected]>>:
Hi,
Yes you need to enable resource filtering [1] for your
features.xml file in your Maven POM. For example to replace
variables in your feature file located in /src/main/features add
the following plugin to your POM:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-features</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/features</outputDirectory>
<resources>
<resource>
<directory>src/main/features</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
[1]
http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
Regards,
Richard
On Wed, Feb 5, 2014 at 5:20 PM, Laci Gaspar <[email protected]
<mailto:[email protected]>> wrote:
Hi
There are two places where I have "version numbers" in my project:
In my pom file and features file.
I tried to replace the one in the features file with
${pom.version} but then karaf complains, that it doesn't know
that:
(Error executing command: URL
[mvn:ch.curabill.msp.service/camel-route/${pom.version}/cfg/groups]
could not be resolved.)
Is there a way to work with variables?
Thanks,
Laci