Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6
-
None
-
winxp, maven 3.0.3
Description
There is a bug in ant 1.8.1 on copy files bigger than 64mb.
Something like :
<target name="test" description="publish file"> <property name="myhost" value="\\myhost"/> <property name="mydir" value="mydir"/> <property name="todirectory" value="${myhost}\${mydir}"/> <echo message="copying to ${todirectory}"/> <mkdir dir="${todirectory}"/> <copy file="my.zip" todir="${todirectory}"/> </target>
wont work in antrun-plugin 1.6 if the file is bigger than 64mb.
Error:
An Ant BuildException has occured: Failed to copy \\...my.zip to \\.... due to Insufficient system resources exist to complete the requested service -> [Help 1] Caused by: java.io.IOException: Insufficient system resources exist to complete the requested servic at sun.nio.ch.FileDispatcher.write0(Native Method)
see also: Ant Bug
Update dependency Ant to 1.8.2 or use this workaround for antrun 1.6:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <dependencies> <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> <version>1.8.2</version> </dependency> </dependencies> </plugin>