ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Philion" <phil...@acmerocket.com>
Subject [PATCH] Fixing property file problem in Property
Date Wed, 19 Jul 2000 13:11:00 GMT
Greetings...

I'm suggesting this patch because it seemed the best way to fix the
problem I've been having with setting "build.compiler" in the
.ant.properties file. The problem occurs because the code won't
override normal properties. I took out the code that checks for the
override because Project handles that (as it should).

There is plenty of cleanup do to in this file, but I just wanted to
get the problem fixed.

- Paul Philion

Index: src/main/org/apache/tools/ant/taskdefs/Property.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Pro
perty.java,v
retrieving revision 1.8
diff -u -c -r1.8 Property.java
cvs server: conflicting specifications of output style
*** src/main/org/apache/tools/ant/taskdefs/Property.java
2000/07/13 15:23:07     1.8
--- src/main/org/apache/tools/ant/taskdefs/Property.java
2000/07/19 13:05:19
***************
*** 159,164 ****
--- 159,168 ----
      }

      private void addProperty(String n, String v) {
+         project.setProperty(n, v);
+         /* Property doesn't set user properties! And don't bother
+          * with checking for override, that should be handled by
+          * project.
          if( userProperty ) {
              if (project.getUserProperty(n) == null) {
                  project.setUserProperty(n, v);
***************
*** 172,177 ****
--- 176,182 ----
                  log("Override ignored for " + name,
Project.MSG_VERBOSE);
              }
          }
+         */
      }

      private void resolveAllProperties(Hashtable props) {



Mime
View raw message