allow variable expansion in sigil-repos.properties (FELIX-1383)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@816519 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java b/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java
index df78233..0480f7e 100644
--- a/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java
+++ b/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java
@@ -154,8 +154,24 @@
BldConfig dflt) throws IOException
{
boolean cached = false;
- String defaults = props.getProperty(BldConfig.S_DEFAULTS, "-"
- + IBldProject.PROJECT_DEFAULTS);
+ String defaults = props.getProperty(BldConfig.S_DEFAULTS);
+
+ if (defaults != null)
+ {
+ defaults = BldUtil.expand(defaults, new Properties()
+ {
+ private static final long serialVersionUID = 1L;
+
+ public String getProperty(String name)
+ {
+ return System.getenv(name);
+ }
+ });
+ }
+ else
+ {
+ defaults = "-" + IBldProject.PROJECT_DEFAULTS;
+ }
if (base != null && defaults.length() > 0)
{