ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Dorner <FDor...@zed.com>
Subject Memory issue when using a lot of 'Ant' tasks.
Date Wed, 29 Jul 2009 14:02:47 GMT
Hey,

Hey,

I've written a task that repeatedly calls the 'Ant' task to execute another target. (The number
of times that target is called
Depends on the size of a given FileSet).

The problem is that I get an OutOfMemory error. Wanted to ask if the following code looks
suspicious to anyone. If not, then the error must be in the called target..


FileSet input = ...
Iterator<?> it = input.iterator();
		while (it.hasNext()) {		
	FileResource res = (FileResource) it.next();
	Properties props = collectPropertiesFor(res, sections);
	doExecute(res, props);
}

and 

doExecute(res, sections) {

	...
	Ant ant = new Ant(this);
	ant.setAntfile(getProject().getProperty("ant.file"));
	ant.setInheritAll(false);
	ant.setInheritRefs(false);
	ant.setTarget(target);	
	...
	ant.execute();
}



Thanks for hints,
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message