0

I want to build an Eclipse RCP application in a way so that the the end user can configure log levels. I want to do it by exposing the log4j.properties file.

Currently that file gets bundled into a jar that is placed under MyApplication\plugins\MyApplication.jar. While I want it to be directly under MyApplication folder where MyApplication.exe is.

I saw some threads about the subject like Proper way to include log4j in an Eclipse 4 (RCP/SWT/OSGi) application but I couldn't find a good answer there. If I create a fragment project for loading the properties, they will still be jarred up, won't they?

I want to know what I can change in my manifest file or Maven pom files so that the log4j.properties file will be taken out of the jar.

Community
  • 1
  • 1
whomaniac
  • 1,258
  • 4
  • 15
  • 22

1 Answers1

0

By using the so-called "root files" configuration, you can bring additional files into the installation of your RCP application. In order to do this you need the following steps:

  1. Add an eclipse-feature project to your build (or use an existing one)

  2. In the feature project, create the files you want to have included in the RCP application installation. In your case, you could for example check in the initial log4j.properties at the location src/root/log4j.properties

  3. Edit the build.properties of the feature project and add the line

    root = file:src/root/**
    
  4. Include the feature in your RCP application product.

Then, all files and folders that you have placed in the src/root/ directory in the feature project will be added to the root of the RCP application installation.

oberlies
  • 11,503
  • 4
  • 63
  • 110