0

Is there any example of how to configure/install Apache Felix File? On the official website, it mentions that you need to configure properties, etc. But nowhere have they mentioned where you need to put those configuration properties - how to set it up, etc.

I have deployed a org.apache.felix.fileinstall-3.5.0.jar file in karaf and I have the felix framework installed. Now I don't know where should I put those configuration properties so that the file install will read it.

Can anyone guide me on this?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • That's a good question, but I think that people on the [Apache Felix mailing lists](http://felix.apache.org/mailinglists.html) might be able to help you sooner. Did you try that? – Scorchio Jul 18 '16 at 12:54

1 Answers1

2

Why did you re-install the felix file install bundle in Karaf? It's already provided out-of-the-box with Apache Karaf. The configuration for felix file-install is also explained in the documentation of Apache Karaf. See section 4.8.1.

For the people searching for quick help here's an excerpt of it:

felix.fileinstall.enableConfigSave = true
felix.fileinstall.dir    = ${karaf.etc}
felix.fileinstall.filter = .*\\.cfg
felix.fileinstall.poll   = 1000
felix.fileinstall.noInitialDelay = true
felix.fileinstall.log.level = 3
felix.fileinstall.log.default = jul

It enabled to save configurations back to files, if those configurations contain the flag needed. This is a special handling of configuration admin service and file install.
It searches the etc folder of karaf for new configuration files which again will be used to configure via configuration admin service.
The filter for those configuration files is set to .cfg.
Every 1000 ms the directory defined will be polled.
No delay when starting.
Loglevel is set to 3 and it uses the jul logger.

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • Thanks for sharing your information,it really saved my time and extremely helpful to my project,yes it is already installed,i didn't know about it before. –  Jul 19 '16 at 05:21
  • I'd suggest if in question ask at the karaf mailing list first. Usually you'll get answers there and quick. – Achim Nierbeck Jul 19 '16 at 05:42