Good research, Hani! (i've moved this to dev)

We have currently switched to Ant 1.5 beta from CVS (in the
MODULE_REFACTORING_BRANCH). I have taken a brief look at AntClassLoader in
CVS
(http://cvs.apache.org/viewcvs.cgi/jakarta-ant/src/main/org/apache/tools/ant
/AntClassLoader.java), and it looks like they're still using Project.class'
ProtectionDomain.

-So I guess we have still have to put xdoclet.jar on the system CP from the
build.bat/build.sh scripts. -Unless anybody can come up with a better
workaround? We could also ask on ant-dev why they're doing it this way and
whether they can change it, but I'm sure they have good reasons to do
it. -They probably won't want to touch anything close to the core at this
time, since they're going to release soon.

Thanks,
Aslak

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Hani
> Suleiman
> Sent: 28. april 2002 23:19
> To: xdoclet-user
> Subject: Re: [Xdoclet-user] Xdoclet cvs issues
>
>
> >
> > -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.
> >
> I've looked through AntClassLoader, and the bug is in there. They do a
> pretty strange thing where the ProtectionDomain of any loaded class is set
> to be the ProtectionDomain for Project.class, which will always
> be ant.jar.
> The correct thing to do is to create a custom ProtectionDomain
> which returns
> the correct value for getCodeSource and so on, it's a few extra lines.
> Unfortunately, this means that there is no workaround for ant 1.4.1. I
> haven't looked at the latest ant cvs/beta to see if this has been fixed,
> mind you. This does mean that currently NO classes loaded by ant's
> classloader can use getProtectionDomain...rather annoying.
>
>
> _______________________________________________
> 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

Reply via email to