Re: controlling ClassLoader when programmatically invoking Ant

2012-07-22 Thread Vimil Saju
I'll probably have to see some code to understand what's going on, but reflection will prevent classcast exceptions when accessing methods of a class loaded from a different class loader.  From: Mitch Gitman To: Ant Developers List Sent: Sunday, July 22, 201

Re: controlling ClassLoader when programmatically invoking Ant

2012-07-22 Thread Mitch Gitman
Right, what you describe falls under the #1 option I'd mentioned: "1. Create a parent ClassLoader just for all the Ant libraries and put JUnit itself and the entire test classpath in a child classloader." Considering that the code in question consists of JUnit tests that I WANT to run from within

Re: controlling ClassLoader when programmatically invoking Ant

2012-07-22 Thread Vimil Saju
>So this time I actually did this. I created this parentless ClassLoader and >created a Project object from it. And what happened? The moment I tried to >assign this object to a Project variable, I got a ClassCastException: >org.apache.tools.ant.Project cannot be cast to >org.apache.tools.ant.Proje

Bug report for Ant [2012/07/22]

2012-07-22 Thread bugzilla
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned