http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1741

*** shadow/1741 Mon May 14 08:17:09 2001
--- shadow/1741.tmp.15406       Mon May 14 08:17:09 2001
***************
*** 0 ****
--- 1,62 ----
+ +============================================================================+
+ | Ant genera                                                                 |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1741                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Normal                   OS/Version: All                     |
+ |     Priority: Medium                    Component: Core tasks              |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                   |
+ |  Reported By: [EMAIL PROTECTED]                                     |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ When using ant with the "-projecthelp" option, variable substitution does not 
+ happen.  A description="blah blah blah ${basedir}" in a target, prints blah 
+ blah blah ${basedir} instead of blah blah blah d:/foo.
+ 
+ There is abug in the Project.copyFile() method.  When ant tries to copy over 
a 
+ file that is readonly then it failes, even if overwrite is set to true (at 
+ least on Windows, where this was tested).  To fix this problem, if ant is 
going 
+ to overwrite the file, then it should delete the destination file first, 
since 
+ it's going to destroy the current contents anyway.  A patch addressing both 
+ these issues is included.
+ 
+ Index: Main.java
+ ===================================================================
+ RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
+ retrieving revision 1.34
+ diff -u -r1.34 Main.java
+ --- Main.java 2001/05/10 15:22:41     1.34
+ +++ Main.java 2001/05/14 14:54:34
+ @@ -552,7 +552,7 @@
+          while (ptargets.hasMoreElements()) {
+              currentTarget = (Target)ptargets.nextElement();
+              targetName = currentTarget.getName();
+ -            targetDescription = currentTarget.getDescription();
+ +            targetDescription = ProjectHelper.replaceProperties(project, 
+ currentTarget.getDescription(), project.getProperties());
+              // maintain a sorted list of targets
+              if (targetDescription == null) {
+                  int pos = findTargetPosition(subNames, targetName);
+ Index: Project.java
+ ===================================================================
+ RCS file: /home/cvspublic/jakarta-
+ ant/src/main/org/apache/tools/ant/Project.java,v
+ retrieving revision 1.57
+ diff -u -r1.57 Project.java
+ --- Project.java      2001/05/08 09:35:28     1.57
+ +++ Project.java      2001/05/14 14:54:56
+ @@ -761,6 +761,8 @@
+              if (!parent.exists()) {
+                  parent.mkdirs();
+              }
+ +            
+ +            destFile.delete();
+  
+              if (filtering) {
+                  BufferedReader in = new BufferedReader(new FileReader
+ (sourceFile));

Reply via email to