Hi Ant developers, There's some discussion raging in Maven land for Maven2 as whether we could/should reuse Ant tasks in embedded mode from within Maven plugins written in java.
The contentious point is that it that some believe it won't be possible to due to the strong tie of Ant tasks to the AntClassloader (see the message below for an example of what I mean). More specifically, I'd like to know why the JUnit task in Ant 1.6 has now lots of dependencies on the Ant classloader. How can we now reuse it in embedded mode? Thanks -Vincent > -----Original Message----- > From: Vincent Massol [mailto:[EMAIL PROTECTED] > Sent: 04 May 2004 08:21 > To: 'Maven Users List' > Subject: RE: [maven2] Anything Groovy in Maven2? > > > > > -----Original Message----- > > From: Jason van Zyl [mailto:[EMAIL PROTECTED] > > Sent: 03 May 2004 23:20 > > To: Maven Users List > > Subject: RE: [maven2] Anything Groovy in Maven2? > > > > On Mon, 2004-05-03 at 15:03, Vincent Massol wrote: > > > > > funnily, I'm running the JUnit task in embedded mode for the abbot > > > plugin I've checked in a few days ago and .... believe it or not... it > > > works :-) > > > > > > Here's the url: http://tinyurl.com/2uy9b (look at the > > > executeAntJunitTestRunner method). > > > > You are running that outside the context of an AntClassLoader? I think > > our notions of embedding are different i.e. I doubt something like IDEA > > or Eclipse are using the Ant JUnitTask internally. I could never get it > > work correctly without forking which I don't consider acceptable for > > embedding. > > Just to be sure, I've printed the CL used. Here's the output: > > Classloader = [EMAIL PROTECTED] > > Also, you can notice in the code that I have: > > // Do not fork so that we use the same classpath that was used to > // start this class. > junit.setFork(false); > > oh... I think I know what could be your problem. I'm running with Ant > 1.5.x and you must be using Ant 1.6.x. I've just checked the > JUnitTask.java code and it seems the Ant team has added some CL code for > Ant 1.6 which is not present for Ant 1.5.x. Maybe that's causing the > problem. I don't know why they did this. I'll ask. > > [snip] > > -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]