felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From db...@apache.org
Subject svn commit: r816519 - /felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java
Date Fri, 18 Sep 2009 08:11:07 GMT
Author: dbaum
Date: Fri Sep 18 08:11:06 2009
New Revision: 816519

URL: http://svn.apache.org/viewvc?rev=816519&view=rev
Log:
allow variable expansion in sigil-repos.properties (FELIX-1383)

Modified:
    felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java

Modified: felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java?rev=816519&r1=816518&r2=816519&view=diff
==============================================================================
--- felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java (original)
+++ felix/trunk/sigil/common/core/src/org/apache/felix/sigil/config/BldProject.java Fri Sep
18 08:11:06 2009
@@ -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)
         {



Mime
View raw message