I'll try and find the time to sort out the ant issue, by talking to them/submitting a patch or whatever. However, I still think the way that xdoclet has been changed is not an ideal design.
Why not, for example, allow for a plugin directory set to be supplied to the bootstrap task? Right now it just assumes that plugins will be all jar files alongside xdoclet.jar, which while covering the most common usage, does not cover the case where your module jars might be in different places (eg, say you're testing a new jar, that is in another build tree, and you want to link that in), just allowing for a 'module-dir' attribute would achieve the same effect I think, as well as bypassing the ant classloader bug. Quoting Aslak Hellesoy <[EMAIL PROTECTED]>: > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Hani > > Suleiman > > Sent: 29. april 2002 02:50 > > To: xdoclet-user > > Subject: Re: [Xdoclet-user] Xdoclet cvs issues > > > > > > On 27/4/02 3:42 pm, "Aslak Hellesoy" <[EMAIL PROTECTED]> wrote: > > > > > -So what the code in xdoclet.jar is doing is to figure out where on the > > > filesystem it is located, and then look for modules in the same > > directory. > > > The reason why we have to construct a large classpath for ant > > in the bat/sh > > > scripts is that this self-location-detection code in > > getXdocletJar() seems > > > to return the location of ant.jar if we don't. I have no idea > > why it is this > > > way, and I discovered that by putting it on the ant classpath > > the problem > > > disappeared. We'd like to avoid this of course. > > > > > Ok, I looked into this further, and the bug is still present in the > latest > > CVS version of ant. > > > > The correct approach is for ant's classloader to extend > SecureClassLoader, > > and specify the correct defineClass method with the right CodeSource. > > > > <rant> > > I'm surprised and disgusted by the ugliness of ant's classloader. Using > > reflection to keep 1.1 compatibility is particularly stupid and > > ugly, and it > > also means that now it's that much harder to fix the codesource bug given > > the the brain damaged way the whole protectiondomain stuff is > > currently done > > in AntClassLoader. A more sensible approach would be to define two > > classloaders, a 1.1 and a 1.2 one, with a helper delegate class to hold > > common functionality. > > > > Ant is a great tool, it's hard to find someone to argue against > > that. But as > > usual with jakarta projects, the implementation is...interesting, > > to put it > > politely. I was a much happier person living in ignorance and > > thinking that > > ant is one of the few jakarta apps that is done right with decent code > > behind it! > > </rant> > > > > Hmm. intersting... It would be very helpful if you would consider posting > the first section of your <rant/> to [EMAIL PROTECTED] (although > slightly rewritten unless you want to start a war with them). Some of the > Ant guys are on this list, so it might be too late ;-) > > We have developed a very good relationship with the Ant folks, and they > actually put in support for dynamic creation of sub-elements in tasks > recently. Upon our request. They're also using XDoclet for their own build > process. > > > I hope someone with commit access to ant (or someone who has some kind of > > influence on ant committers) can take this issue up with them, > > and fix this > > Anyway, it sounds like you're a classloader magician, and we'd definitely > be > grateful if you could help us solving this issue. If you post to ant-dev, > you can refer to us, and they are likely to give it higher pri than if not > (I think). > > Cheers, > Aslak > > > so xdoclet doesn't end up suffering in result! > > > > Hani > > > > > > _______________________________________________ > > Xdoclet-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
