karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [42/50] [abbrv] karaf git commit: [KARAF-4590] Document environment variable reference from configuration files - document default and alternate property values
Date Mon, 22 Aug 2016 09:30:40 GMT
[KARAF-4590] Document environment variable reference from configuration files - document default
and alternate property values


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/e6c8f20e
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/e6c8f20e
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/e6c8f20e

Branch: refs/heads/master
Commit: e6c8f20e38296faaa74baab02151d16180049593
Parents: d67dee3
Author: Ion Savin <comp_@gmx.net>
Authored: Tue Jul 19 23:53:38 2016 +0300
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Aug 22 11:29:21 2016 +0200

----------------------------------------------------------------------
 .../src/main/asciidoc/user-guide/configuration.adoc | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/e6c8f20e/manual/src/main/asciidoc/user-guide/configuration.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/configuration.adoc b/manual/src/main/asciidoc/user-guide/configuration.adoc
index ceb7468..4ee0ad3 100644
--- a/manual/src/main/asciidoc/user-guide/configuration.adoc
+++ b/manual/src/main/asciidoc/user-guide/configuration.adoc
@@ -33,8 +33,20 @@ A configuration file is a properties file containing key/value pairs:
 property=value
 ----
 
-Environment variables can be referenced inside configuration files using the syntax `${env:<variable_name>}`
(e.g.
-`property=${env:FOO}` will set "property" to the value of the enviroment variable "FOO").
+Properties can be referenced inside configuration files using the syntax `${<name>}`.
Default and alternate
+values can be specified using `${<name>:-<default_value>}` and `${<name>:+<alternate_value>}`
syntaxes respectively.
+
+----
+existing_property=baz
+property1=${missing_property:-foo}   # "foo"
+property2=${missing_property:+foo}   # empty string
+property3=${existing_property:-bar}  # "baz"
+property4=${existing_property:+bar}  # "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.
 
 In Apache Karaf, a configuration is PID with a set of properties attached.
 


Mime
View raw message