This is an automated email from the ASF dual-hosted git repository. jbonofre pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/master by this push: new 4e3bb0a Revert "Update configuration user guide about system properties" 4e3bb0a is described below commit 4e3bb0a99bca6851a707d6f2c022388124cedc09 Author: jbonofre <jbono...@apache.org> AuthorDate: Wed Sep 30 09:18:48 2020 +0200 Revert "Update configuration user guide about system properties" This reverts commit 4c33fd1596c2b81febc213b193f544274fad2937. --- config/pom.xml | 10 +++------- .../karaf/config/core/impl/KarafConfigurationPlugin.java | 2 -- manual/src/main/asciidoc/user-guide/configuration.adoc | 8 -------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/config/pom.xml b/config/pom.xml index 5ce31e3..83910e8 100644 --- a/config/pom.xml +++ b/config/pom.xml @@ -59,10 +59,6 @@ <groupId>org.apache.karaf</groupId> <artifactId>org.apache.karaf.util</artifactId> </dependency> - <dependency> - <groupId>org.apache.felix</groupId> - <artifactId>org.apache.felix.utils</artifactId> - </dependency> <dependency> <groupId>org.apache.karaf.shell</groupId> @@ -105,7 +101,8 @@ <instructions> <Export-Package> org.apache.karaf.config.command*, - org.apache.karaf.config.core + org.apache.karaf.config.core, + org.apache.felix.utils.properties;version="${felix.utils.version}" </Export-Package> <Import-Package> org.osgi.service.metatype;resolution:=optional, @@ -115,8 +112,7 @@ <Private-Package> org.apache.karaf.config.core.impl, org.apache.karaf.config.core.impl.osgi, - org.apache.karaf.util, - org.apache.felix.utils* + org.apache.karaf.util </Private-Package> </instructions> </configuration> diff --git a/config/src/main/java/org/apache/karaf/config/core/impl/KarafConfigurationPlugin.java b/config/src/main/java/org/apache/karaf/config/core/impl/KarafConfigurationPlugin.java index e3ca937..913bcab 100644 --- a/config/src/main/java/org/apache/karaf/config/core/impl/KarafConfigurationPlugin.java +++ b/config/src/main/java/org/apache/karaf/config/core/impl/KarafConfigurationPlugin.java @@ -16,7 +16,6 @@ */ package org.apache.karaf.config.core.impl; -import org.apache.felix.utils.properties.InterpolationHelper; import org.osgi.framework.Constants; import org.osgi.framework.ServiceReference; import org.osgi.service.cm.ConfigurationPlugin; @@ -42,7 +41,6 @@ public class KarafConfigurationPlugin implements ConfigurationPlugin { String env = (pid + "." + key).toUpperCase().replaceAll("\\.", "_"); String sys = pid + "." + key; if (System.getenv(env) != null) { - Object value = InterpolationHelper.performSubstitution(); if (properties.get(key) != null && (properties.get(key) instanceof Number)) { properties.put(key, Integer.parseInt(System.getenv(env))); } else { diff --git a/manual/src/main/asciidoc/user-guide/configuration.adoc b/manual/src/main/asciidoc/user-guide/configuration.adoc index fe50808..764becb 100644 --- a/manual/src/main/asciidoc/user-guide/configuration.adoc +++ b/manual/src/main/asciidoc/user-guide/configuration.adoc @@ -68,14 +68,6 @@ property3=${existing_property:-bar} # "baz" property4=${existing_property:+bar} # "bar" ---- -Apache Karaf will look for system property as well. For instance, the following: - ----- -key=${foo} ----- - -means that `key` will contain `bar` if you start Karaf with `-Dfoo=bar`. - Environment variables can be referenced inside configuration files using the syntax `${env:<name>}` (e.g. `property=${env:FOO}` will set "property" to the value of the enviroment variable "FOO"). Default and alternate values can be defined for them as well using the same syntax as above.