ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Tue, 07 Aug 2001 11:43:32 GMT
bodewig     01/08/07 04:43:32

  Modified:    src/main/org/apache/tools/ant Project.java
               src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Make sure system properties as accessible in subbuilds in the
  inheritAll=false case as well.
  
  Submitted by:	Craeg K. Strong <cstrong@arielpartners.com>
  
  Revision  Changes    Path
  1.72      +11 -7     jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Project.java	2001/08/07 05:49:48	1.71
  +++ Project.java	2001/08/07 11:43:32	1.72
  @@ -212,13 +212,7 @@
               throw new BuildException("Can't load default datatype list");
           }
   
  -        Properties systemP = System.getProperties();
  -        Enumeration e = systemP.keys();
  -        while (e.hasMoreElements()) {
  -            Object name = e.nextElement();
  -            String value = systemP.get(name).toString();
  -            this.setProperty(name.toString(), value);
  -        }
  +        setSystemProperties();
       }
   
       public void setSystemLoader(ClassLoader systemLoader) {
  @@ -381,6 +375,16 @@
           log("Detected Java version: " + javaVersion + " in: " + System.getProperty("java.home"),
MSG_VERBOSE);
   
           log("Detected OS: " + System.getProperty("os.name"), MSG_VERBOSE);
  +    }
  +
  +    public void setSystemProperties() {
  +        Properties systemP = System.getProperties();
  +        Enumeration e = systemP.keys();
  +        while (e.hasMoreElements()) {
  +            Object name = e.nextElement();
  +            String value = systemP.get(name).toString();
  +            this.setProperty(name.toString(), value);
  +        }
       }
   
       public void addTaskDefinition(String taskName, Class taskClass) {
  
  
  
  1.25      +4 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Ant.java	2001/07/22 15:29:10	1.24
  +++ Ant.java	2001/08/07 11:43:32	1.25
  @@ -166,6 +166,10 @@
           }
           else {
              prop1 = project.getUserProperties();
  +
  +           // set Java built-in properties separately,
  +           // b/c we won't inherit them.
  +           project.setSystemProperties();
           }
           
           e = prop1.keys();
  
  
  

Mime
View raw message