You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eric Fetzer <el...@yahoo.com> on 2010/01/21 23:34:27 UTC
Out of Heap Error
OK, I'm totally lost. I've been running this script over and over all day trying to debug a later part in it that I've taken out. There have been no problems with this part. All of a sudden, it gets like 30 directories in and crashes! If I remove the call to the macrodef <md.AppendProperty>, it runs fast and fine. I rebooted and everything. Anyone know what gives?
<project default="main">
<!--Include the antlib tasks-->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<taskdef name="unset" classname="ise.antelope.tasks.Unset"/>
<property name="parentFolders" value=""/>
<target name="main">
<delete file="filesToDelete.txt"/>
<for param="dir" >
<dirset dir="C:\build" />
<sequential>
<pathconvert property="@{dir}.list" setonempty="no" >
<path>
<fileset dir="@{dir}" defaultexcludes="yes" />
</path>
</pathconvert>
<if><not><isset property="@{dir}.list" /></not>
<then>
<md.AppendProperty var.propertyName="folders" var.stringAppend="@{dir},"/>
<echo message="@{dir}"/>
</then>
</if>
</sequential>
</for>
</target>
<macrodef name="md.AppendProperty">
<attribute name="var.propertyName"/>
<attribute name="var.stringAppend"/>
<sequential>
<var name="@{var.propertyName}" value="${@{var.propertyName}}@{var.stringAppend}"/>
</sequential>
</macrodef>
</project>
Thanks,
Eric
Re: Out of Heap Error
Posted by Eric Fetzer <el...@yahoo.com>.
If I change the macrodef to:
<macrodef name="md.AppendProperty">
<attribute name="var.propertyName"/>
<attribute name="var.stringAppend"/>
<sequential>
<script language="javascript"> <![CDATA[
curVal=project.getProperty("@{var.propertyName}");
project.setProperty("@{var.propertyName}",curVal+"@{var.stringAppend}");
]]>
</script>
</sequential>
</macrodef>
Then it works fine...
________________________________
From: Eric Fetzer <el...@yahoo.com>
To: Ant Users <us...@ant.apache.org>
Sent: Thu, January 21, 2010 3:34:27 PM
Subject: Out of Heap Error
OK, I'm totally lost. I've been running this script over and over all day trying to debug a later part in it that I've taken out. There have been no problems with this part. All of a sudden, it gets like 30 directories in and crashes! If I remove the call to the macrodef <md.AppendProperty>, it runs fast and fine. I rebooted and everything. Anyone know what gives?
<project default="main">
<!--Include the antlib tasks-->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<taskdef name="unset" classname="ise.antelope.tasks.Unset"/>
<property name="parentFolders" value=""/>
<target name="main">
<delete file="filesToDelete.txt"/>
<for param="dir" >
<dirset dir="C:\build" />
<sequential>
<pathconvert property="@{dir}.list" setonempty="no" >
<path>
<fileset dir="@{dir}" defaultexcludes="yes" />
</path>
</pathconvert>
<if><not><isset property="@{dir}.list" /></not>
<then>
<md.AppendProperty var.propertyName="folders" var.stringAppend="@{dir},"/>
<echo message="@{dir}"/>
</then>
</if>
</sequential>
</for>
</target>
<macrodef name="md.AppendProperty">
<attribute name="var.propertyName"/>
<attribute name="var.stringAppend"/>
<sequential>
<var name="@{var.propertyName}" value="${@{var.propertyName}}@{var.stringAppend}"/>
</sequential>
</macrodef>
</project>
Thanks,
Eric