Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5440

No override facility for properties in system.properties

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.3, 4.2.0.M1
    • Component/s: karaf
    • Labels:
      None

      Description

      There are two properties files in karaf that give global properties of various kinds, system.properties and config.properties.

      The "config.properties" file has a facility to override properties within it by putting values in the "custom.properties" file. We use this to tweak certain values in out custom distribution.
      There's no such facility though for the "system.properties" file.

      At the moment we therefore hold a copy of the whole system.properties file with a couple of modifications and include that in our distribution. This is fragile though. For example, recently one of the properties was changes by a commit to karaf and it took me a while to work out why things suddenly started behaving differently (this isn't a criticism, I'm just pointing out the fragility, in case it wasn't clear).

      It looks like there wouldn't be any particular reason why this couldn't be done by org.apache.karaf.util.config.PropertiesLoader. I'm happy to provide a pull request for consideration. I would have suggested having an ${optionals} line in the system.properties file that would load a file called, say, custom.system.properties. I would have just replaced the code to load the properties in loadSystemProperties with a call to loadPropertiesFile.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                tomq42 Tom Quarendon
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: