Apache Felix File Install example

2019-06-17 10:16发布

问题:

Is there any example of how to configure/install Apache Felix File install? In official website, it has been mentioned you need to configure properties etc. But no way they have mentioned where you need to put those configuration properties, how to set it up etc.

I have downloaded org.apache.felix.fileinstall-3.2.6.jar file and I have felix framework installed. Now I am not getting where should I put those configuration properties so that file install will read that.

Can anyone guide me on this?

回答1:

As specified in the File Install Docs you can provide the configuration via system properties. Below steps work for Felix started from standard distribution

  1. Download Felix from here
  2. Unzip the content
  3. Download the File Install bundle from here and copy it to the bundle folder. By default Felix would auto deploy all bundles from this folder.
  4. Create a folder named deploy. This directory would be configured with File install
  5. Start Felix java -Dfelix.fileinstall.dir=./deploy -jar bin/felix.jar.

Now any jar which is added to the deploy folder would be installed by the File Install bundle