Maven Antrun Plugin
  1. Maven Antrun Plugin
  2. MANTRUN-162

Update Ant 1.8.2, avoid insufficient system resources error

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Labels:
      None
    • Environment:
      winxp, maven 3.0.3
    • Number of attachments :
      0

      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>
      

        Activity

        Hide
        Benson Margulies added a comment -

        the ant 1.8.2 release notes state:

        • Removed ant-nodeps.jar; it is now merged into ant.jar.

        So I'm updating to just use plain 'ant'.

        Show
        Benson Margulies added a comment - the ant 1.8.2 release notes state: Removed ant-nodeps.jar; it is now merged into ant.jar. So I'm updating to just use plain 'ant'.
        Hide
        Benson Margulies added a comment -

        Done.

        Show
        Benson Margulies added a comment - Done.

          People

          • Assignee:
            Benson Margulies
            Reporter:
            Bruno Marti
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: