title: Build Failed java.lang.OutOfMemoryError: Java heap space
body: <p>I am facing this issue while building my build.xml.</p>
  
  <pre><code>BUILD FAILED
  java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Arrays.java:2786)
      at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
      at org.codehaus.cargo.module.DefaultJarArchive.&lt;init&gt;(DefaultJarArchive.
  java:75)
      at org.codehaus.cargo.module.DefaultJarArchive.&lt;init&gt;(DefaultJarArchive.
  java:56)
      at org.codehaus.cargo.module.webapp.DefaultWarArchive.&lt;init&gt;(DefaultWarA
  rchive.java:69)
      at org.apache.cactus.integration.ant.CactifyWarTask.addJarWithClass(Cact
  ifyWarTask.java:652)
      at org.apache.cactus.integration.ant.CactifyWarTask.addCactusJars(Cactif
  yWarTask.java:627)
      at org.apache.cactus.integration.ant.CactifyWarTask.execute(CactifyWarTa
  sk.java:519)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
  a:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
      at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
  a:106)
      at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
  a:106)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:357)
      at org.apache.tools.ant.Target.performTasks(Target.java:385)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
  </code></pre>