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 12999] New: - failonerror does not work on Copy task
Date Wed, 25 Sep 2002 18:01:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12999>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

failonerror does not work on Copy task

           Summary: failonerror does not work on Copy task
           Product: Ant
           Version: 1.5
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: cmcfarland@onebox.com


I'm copying files using Copy task with a Fileset to copy directory structure 
from one location to another. I have Copy task failonerror="false" because I 
don't want the copy failure to crash the build. The problem is that when I have 
read-only privileges for destination location the copy fails and so does the 
build. Here is the copy portion of my target:

        <!-- copy local javadoc to shared dir -->
        <copy todir="${shared.javadoc.dir}" overwrite="true" 
            failonerror="false" preservelastmodified="no">
            <fileset dir="${local.javadoc.dir}">
                <include name="**/*"/>
            </fileset>
        </copy>

Earlier inside the same <target> is a <delete> task w/ fileset to delete the 
destination directory (which is unsuccessful due to read-only) followed by a 
<mkdir> to then create the top-level of the destination directory (which does 
nothing because the directory is present). I have pasted the failure output 
below:

     [copy] Copying 114 files to \\Twcsrv13\rdata\Inet_Global\Standards & 
Templates\GASS\Development\API
     [copy] Copying 
C:\ChrisFiles\projects\twc\GASS\antbuild\javadoc\twc\security\operation\DataOper
ationFactory.html to \\Twcsrv13\rdata\Inet_Global\Standards & 
Templates\GASS\Development\API\twc\security\operation\DataOperationFactory.html

BUILD FAILED
file:C:/ChrisFiles/projects/twc/GASS/antbuild/build.xml:225: Failed to copy 
C:\ChrisFiles\projects\twc\GASS\antbuild\javadoc\twc\security\operation\DataOper
ationFactory.html to \\Twcsrv13\rdata\Inet_Global\Standards & 
Templates\GASS\Development\API\twc\security\operation\DataOperationFactory.html 
due to \\Twcsrv13\rdata\Inet_Global\Standards & 
Templates\GASS\Development\API\twc\security\operation\DataOperationFactory.html 
(The system cannot find the path specified)
	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:534)
	at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:368)
	at org.apache.tools.ant.Task.perform(Task.java:317)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:334)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
	at org.apache.tools.ant.Main.runBuild(Main.java:610)
	at org.apache.tools.ant.Main.start(Main.java:196)
	at org.apache.tools.ant.Main.main(Main.java:235)
--- Nested Exception ---
java.io.FileNotFoundException: \\Twcsrv13\rdata\Inet_Global\Standards & 
Templates\GASS\Development\API\twc\security\operation\DataOperationFactory.html 
(The system cannot find the path specified)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
	at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:395)
	at org.apache.tools.ant.util.FileUtils.copyFile(FileUtils.java:225)
	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:527)
	at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:368)
	at org.apache.tools.ant.Task.perform(Task.java:317)
	at org.apache.tools.ant.Target.execute(Target.java:309)
	at org.apache.tools.ant.Target.performTasks(Target.java:334)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
	at org.apache.tools.ant.Main.runBuild(Main.java:610)
	at org.apache.tools.ant.Main.start(Main.java:196)
	at org.apache.tools.ant.Main.main(Main.java:235)

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


Mime
View raw message