Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 20375 invoked by uid 500); 7 Aug 2001 11:45:13 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 20366 invoked by uid 500); 7 Aug 2001 11:45:13 -0000 Delivered-To: apmail-jakarta-ant-cvs@apache.org Date: 7 Aug 2001 11:43:32 -0000 Message-ID: <20010807114332.29458.qmail@icarus.apache.org> From: bodewig@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Ant.java X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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 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();