Re: launch Ant from Java code

2011-01-12 Thread Patrick Martin
Thank you Antoine, I do have a follow-up question on this though. Will this be thread safe? Is it possible to run two targets in parallel from Java code, without any interactions (different projects, property sets and so on)? I am especially afraid of the system properties which may be shared and

Re: SplitClassLoader cast error

2011-01-12 Thread Antoine Levy Lambert
Hello David, I am not sure whether SplitClassLoader extends URLClassLoader. In my IDE I see this class hierarchy SplitClassLoader ---> AntClassLoader --> ClassLoader --> Object So maybe the source code of your unit test is doing something wrong. Regards, Antoine On 1/12/11 10:21 AM, David R

Re: launch Ant from Java code

2011-01-12 Thread Antoine Levy Lambert
Hello Patrick, you can have a look at this document from our manual too : http://ant.apache.org/manual/antexternal.html Creating a Project object is necessary in nearly all cases because ant tasks generally need to be bound to a project in order to be able to log. I have another example whic

SplitClassLoader cast error

2011-01-12 Thread David Rush
I use ant from the command line for building my apps and running my tests. I'm trying to get testing working for a servlet that forwards to a .jsp page (using HttpUnit with ServletUnit), but I keep hitting a wall: [junit] Error testing ViewAllProjectsServlet, exception is com.meterware.ht

launch Ant from Java code

2011-01-12 Thread Patrick Martin
Hello and happy new year to you all, What is the recommended way for launching an Ant script/task from Java code ? It seems to me that the following URL http://ant.apache.org/manual/running.html#viajava rather explains how to launch Ant with java.exe from the command line. Is it also recommended