ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41948] New: - move task fails to rename file and also deletes source file
Date Mon, 26 Mar 2007 18:56:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41948>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41948

           Summary: move task fails to rename file and also deletes source
                    file
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: simpson.cl@gmail.com


The following build.xml fails at line 6 when it attempts to move
MysolutionParamlet.java to MySolutionParamlet.java.

   <?xml version="1.0"?>
   <project name="debugit" default="move" basedir="">
      <property name="solutionU" value="MySolution"/>
      <property name="codeDir" value="C:\Test"/>
      <target name="move">
         <move file="${codeDir}\MysolutionParamlet.java"
               tofile="${codeDir}\${solutionU}Paramlet.java" verbose="true"/>
         <move file="${codeDir}\MysolutionParamletFactory.java" 
               tofile="${codeDir}\${solutionU}ParamletFactory.java"
               verbose="true"/>
      </target>
   </project>

The console output is:

   C:\Test>\apache-ant-1.7.0\bin\ant.bat
   Buildfile: build.xml

   move:
     [move] Moving 1 files to C:\Test
     [move] Attempting to rename: C:\Test\MysolutionParamlet.java to
C:\Test\MySolutionParamlet.java
     [move] Copying C:\Test\MysolutionParamlet.java to
C:\Test\MySolutionParamlet.java

   BUILD FAILED
   C:\Test\build.xml:7: Failed to copy C:\Test\MysolutionParamlet.java to
C:\Test\MySolutionParamlet.java due to C:\Test\MysolutionParamlet.java (The
system cannot find the file specified)

   Total time: 0 seconds

Sometime during the move operation the file MysolutionParamlet.java was also
removed. This fails consistently on Windows XP with both Ant-1.6.2 and Ant-1.7.0.

The only workaround I have found is to move the file to a differently named
(something besides My[sS]olutionXXX.java) intermediate file and then move it to
the target name. This is probably due to Windows case insensitivity but it
should not delete the file.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message