Question

We have a RCP application which includes domain specific configuration files(properties file, and few folders containing xml's) in its installation directory. We have provided update support through P2 framework which works for plug-ins and features, But now we are planning to provide update support for the configuration files as well.

Is it possible to update the configuration files with P2 framework?

Any link to do the same would be helpful.

Was it helpful?

Solution

What you need is the so-called "root files" (do not mix up with "root IU").

An example of those is org.eclipse.equinox.executable feature which includes the .exe/.so files which are installed to the root directory of your product.

There are several ways to achieve it, here the simplest one:

  1. create a feature project named xyz.feature
  2. place all files you want to have in the root of your product into the /xyz.feature/root.files/ directory
  3. create the following entry in the /xyz.feature/build.properties:

    root=root.files

  4. Include this feature in your main feature / product configuration

  5. Export the feature/product into a p2 repository

You can examine the resulting p2 repo to see what p2 does exactly with this magic "root=" property key on export.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top