Yeah so I must be doing something wrong, I know that.. And of course the maven properties are parsed so project.version are replaced with the correct stuff..
What about Approach 2 ? Are there any special steps needed? When putting the config files into the etc folder for a custom distribtion? On Fri, Feb 2, 2018 at 10:20 AM, Jean-Baptiste Onofré <j...@nanthrax.net> wrote: > Hi, > > I confirm it works as it's what we are using in Decanter or Cellar, or even > Karaf itself. > > 1. configfile: > > https://github.com/jbonofre/karaf-decanter/blob/master/ > assembly/src/main/feature/feature.xml#L48 > > Here the files will end into the etc folder when you feature is installed. > > Of course, the concrete feature has to be resolved that way > (http://repo.maven.apache.org/maven2/org/apache/karaf/ > decanter/apache-karaf-decanter/1.4.0/apache-karaf- > decanter-1.4.0-features.xml): > > <configfile finalname="/etc/org.apache.karaf.decanter.collector.log.cfg"> > mvn:org.apache.karaf.decanter.collector/org.apache.karaf. > decanter.collector.log/1.4.0/cfg > </configfile> > > So I hope you don't have ${project.version} in the URL and the Karaf system > folder or .m2/repository or remote repo contains: > > dk/netdesign/osgi-dialer/osgi-dialer-backend/xx/osgi-dialer- > backend-xx-configuration.cfg > > > 2. confg works also, but it depnds of the Karaf version you are using. In > the > past, we didn't created the cfg file corresponding to <config/>. > "Recently", we > changed to write the file. > > Regards > JB > > On 02/02/2018 10:15 AM, nino martinez wael wrote: > > Hi fellow karaflings > > > > I want to either prepackage or install my configuration files into the > etc > > folder of karaf when my feature installs. > > > > I've tried a couple of different approaches, which all fails :( They > fail in the > > way that the configuration gets bound to the bundles mvn coordinates and > are not > > placed into the etc folder > > > > *Approach 1 Feature file* > > > > The following to techniques are supposed to place my configuration files > into > > the etc folder > > > > Using the configfile element, > > > > <feature> > > > > ... > > > > <configfile finalname="/etc/dk.netdesign.dialer.cfg">mvn:dk.netdesign. > osgi-dialer/osgi-dialer-backend/${project.version}/ > cfg/configuration</configfile> > > > > ... > > > > </feature> > > > > > > > > > > Using the config element > > > > <feature> > > > > ... > > > > <config name="dk.netdesign.dialer"> > > > > myobscurepropperty=ILoveKaraf:) > > > > </config> > > > > ... > > > > </feature> > > > > > > *Approach 2 Karaf distribution with the karaf assembly plugin for maven > / prefered* > > > > This approach will have the benefit of me being able to put in > configurations for some of the features / bundles that I do not control > > > > C:. > > └───main > > ├───distribution > > │ └───text > > │ └───etc > > └───java > > └───dk > > └───netdesign > > └───osgidialer > > └───dialer > > └───karaf > > └───assembly > > > > In the etc folder I've placed my configuration file... But they never > show up in > > my karaf distribution.. I've done nothing special in the assembly > plugin, I > > wonder what I am doing wrong? > > > > -- > > Best regards / Med venlig hilsen > > Nino Martinez > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com > -- Best regards / Med venlig hilsen Nino Martinez