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

Variables cannot be used in org.apache.karaf.features.cfg

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: karaf-config
    • Labels:
      None
    • Environment:

      Windows 7
      Java 6

      Description

      Normally, variables defined in custom.properties can be used in configuration files handled by FileInstall. For some reason this does not seem to work in org.apache.karaf.features.cfg.

      E g, this works:

      • Put the following line in custom.properties:

      logdir=data/log

      • Put the following line in org.ops4j.pax.logging.cfg:

      log4j.appender.info.file=${logdir}/info.log

      But this does NOT work:

      • Put the following line in custom.properties:

      var = mvn:org.apache.karaf.features/standard/3.0.0-SNAPSHOT/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.0-SNAPSHOT/xml/features,mvn:org.apache.karaf.features/spring/3.0.0-SNAPSHOT/xml/features

      • Put the following line in org.apache.karaf.features.cfg:

      featuresRepositories = ${var}

      This has been discussed on the Karaf user list:

      http://karaf.922171.n3.nabble.com/Using-variables-in-org-apache-karaf-features-cfg-td4027053.html

        Activity

        Hide
        sprhodes Phillip Rhodes added a comment -

        Any chance of getting any movement on this? Using ServiceMix, it would be nice to be able to specify the path to a feature repository using a variable like karaf.base or whatever, instead of having to plugin in the absolute path every time. Also, FWIW, putting a variable in the file for something like a repository location not only doesn't work, it breaks something in how the file is processed, as even the other (correctly specified) repositories don't load (well, at least in ServiceMix 6.1.0. Not sure which version of Karaf that's based on).

        Show
        sprhodes Phillip Rhodes added a comment - Any chance of getting any movement on this? Using ServiceMix, it would be nice to be able to specify the path to a feature repository using a variable like karaf.base or whatever, instead of having to plugin in the absolute path every time. Also, FWIW, putting a variable in the file for something like a repository location not only doesn't work, it breaks something in how the file is processed, as even the other (correctly specified) repositories don't load (well, at least in ServiceMix 6.1.0. Not sure which version of Karaf that's based on).

          People

          • Assignee:
            Unassigned
            Reporter:
            rodehav Bengt Rodehav
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development