I am using the maven plugin to build a karaf feature. I want to bundle a configuration file with the feature and copy it to a specific directory when the feature installs. i.e. I want this to happen when the user types features:install features-myfeature on the karaf console. Right now I am doing it as part of the build process (manually copying the file using maven).
Is there something I can do in the resource definition file to include the file I want to copy over so that karaf will copy the file when the feature is loaded?
Opendaylight uses karaf 4.0.
Thanks
You use the build-helper-maven-plugin to package your config file(s) into artifact(s). See https://github.com/opendaylight/controller/blob/master/opendaylight/md-sal/sal-clustering-config/pom.xml for an example. Then you use the element in your feature.xml, see eg https://github.com/opendaylight/controller/blob/master/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml.