I've had this problem too (running out of perm-gen due to running Ant-tasks in Gradle). After logging the hashcodes of the Ant objects and the Ant tasks it turned out that both where recreated on every invokation of the Gradle action they were embedded within. And since my task is written in Groovy with a lot of closures, a lot of classes got generated (I'm guessing every invokcation of the Ant task created new classes for the ant-task and its closures). My solution was to simply use the ant task of the root-project.

Den 26-01-2012 23:47, Rajiv Narula skrev:
Saw your reply on SO
Will reply to your comment there.
I can see the confusion caused by double post- though that wasn't my intent

On Thu, Jan 26, 2012 at 5:39 PM, Rajiv Narula <rajiv.nar...@gmail.com> wrote:
Sorry- for the double post
I did\do intend to update both threads after I find the solution.
The reason I posted here was- earlier, I wasn't sure which tool\api to target and thanks to your reply on SO, I concluded it is Gradle and hence posted here

With due respect, I believe it is a Gradle Question 
My question (rephrased) is..
How do you increase the available PermGen to the ant task invoked from a Gradle  
Ant documentation refers to ANT_OPTS
If I start a Gradle command with ANT_OPTS, will it pass those to any ant task that you initiate from the gradle script ?

Thanks for your help.


On Thu, Jan 26, 2012 at 4:49 PM, Peter Niederwieser <pnied...@gmail.com> wrote:
Please don't double post. As I said on SO, the easyB Ant task seems to create
a new process, which makes this a pure easyB (Ant task) question. I
recommend to ask on the easyB list.

--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw

--
View this message in context: http://gradle.1045684.n5.nabble.com/PermGen-error-while-running-Ant-from-gradle-tp5433678p5434085.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
-Rajiv
www.rajivnarula.com



--
-Rajiv
www.rajivnarula.com

--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to