You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by gn...@apache.org on 2016/09/12 12:14:29 UTC
svn commit: r1760342 - in /aries/trunk/blueprint: blueprint-cm/pom.xml
blueprint-core/pom.xml
blueprint-core/src/main/java/org/apache/aries/blueprint/ext/PropertyPlaceholder.java
blueprint-itests/pom.xml
Author: gnodet
Date: Mon Sep 12 12:14:29 2016
New Revision: 1760342
URL: http://svn.apache.org/viewvc?rev=1760342&view=rev
Log:
[ARIES-1311] Support for env:XXX variable names in property placeholders to access environment variables instead of system variables
Modified:
aries/trunk/blueprint/blueprint-cm/pom.xml
aries/trunk/blueprint/blueprint-core/pom.xml
aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/ext/PropertyPlaceholder.java
aries/trunk/blueprint/blueprint-itests/pom.xml
Modified: aries/trunk/blueprint/blueprint-cm/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-cm/pom.xml?rev=1760342&r1=1760341&r2=1760342&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-cm/pom.xml (original)
+++ aries/trunk/blueprint/blueprint-cm/pom.xml Mon Sep 12 12:14:29 2016
@@ -56,7 +56,7 @@
</aries.osgi.private.pkg>
<blueprint.api.version>1.0.0</blueprint.api.version>
- <blueprint.core.version>1.6.3-SNAPSHOT</blueprint.core.version>
+ <blueprint.core.version>1.7.0-SNAPSHOT</blueprint.core.version>
<blueprint.parser.version>1.4.0</blueprint.parser.version>
<lastReleaseVersion>1.0.8</lastReleaseVersion>
</properties>
Modified: aries/trunk/blueprint/blueprint-core/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/pom.xml?rev=1760342&r1=1760341&r2=1760342&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/pom.xml (original)
+++ aries/trunk/blueprint/blueprint-core/pom.xml Mon Sep 12 12:14:29 2016
@@ -32,7 +32,7 @@
<artifactId>org.apache.aries.blueprint.core</artifactId>
<packaging>bundle</packaging>
<name>Apache Aries Blueprint Core</name>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
<description>
This bundle contains the core implementation of Blueprint
along with the "ext" namespace handler.
Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/ext/PropertyPlaceholder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/ext/PropertyPlaceholder.java?rev=1760342&r1=1760341&r2=1760342&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/ext/PropertyPlaceholder.java (original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/ext/PropertyPlaceholder.java Mon Sep 12 12:14:29 2016
@@ -122,7 +122,7 @@ public class PropertyPlaceholder extends
LOGGER.debug("Retrieving property {}", val);
Object v = null;
if (v == null && systemProperties == SystemProperties.override) {
- v = System.getProperty(val);
+ v = getSystemProperty(val);
if (v != null) {
LOGGER.debug("Found system property {} with value {}", val, v);
}
@@ -134,7 +134,7 @@ public class PropertyPlaceholder extends
}
}
if (v == null && systemProperties == SystemProperties.fallback) {
- v = System.getProperty(val);
+ v = getSystemProperty(val);
if (v != null) {
LOGGER.debug("Found system property {} with value {}", val, v);
}
@@ -151,6 +151,13 @@ public class PropertyPlaceholder extends
return v != null ? v.toString() : null;
}
+ protected String getSystemProperty(String val) {
+ if (val.startsWith("env:")) {
+ return System.getenv(val.substring("env:".length()));
+ }
+ return System.getProperty(val);
+ }
+
@Override
protected String retrieveValue(String expression) {
LOGGER.debug("Retrieving Value from expression: {}", expression);
Modified: aries/trunk/blueprint/blueprint-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/pom.xml?rev=1760342&r1=1760341&r2=1760342&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/pom.xml (original)
+++ aries/trunk/blueprint/blueprint-itests/pom.xml Mon Sep 12 12:14:29 2016
@@ -62,7 +62,7 @@
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.core</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>