ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Vedovini <CVedov...@odyssey-group.com>
Subject Antlib & ClassLoading issues
Date Mon, 03 May 2004 18:17:17 GMT
I all,

I am just trying to take advantage of the Antlib feature and it seems that
in certain circumstances it does not work as expected :-)

Ok, here is the background:

We built a nice continuous integration infrastructure using ant, which is
driven by a web application (our build launcher, currently running with
Websphere, Weblogic and Tomcat) we also developed some tasks that are
automatically put in the context of the build by our launcher.
Grosso-modo the launcher is a servlet that creates a Project instance,
configures it and so on.
As you can imagine it also uses the setCoreLoader method to give the Project
the web-app ClassLoader (which is a non-delegating J2EE ClassLoader).
All this used to work since two years or so...

Those last days I tried to promote out own tasks to an Antlib library in
order to take advantage of the namespace stuff and here is the problem I ran
into:

 - When I declare my antlib: namespace in a "sub" build (called via the
<ant> task) I got a ClassNotFoundException (and Ant tells me that I
certainly forgot to add a jar in the lib folder)

I took a look at the <ant> task and it seems that the CoreLoader of the
calling project (which should further be used to load tasks I guess) is not
passed through to the called project. Taskdefs are, which explains why it
was working previously, but as I guess that antlibs are loaded on request
(when the namespace declaration is met) and using the project's ClassLoader
then my tasks' classes are no more in the scope.

I am not 100% sure the problem lies where I think, so if someone could have
a look (or two) at that issue I think it could help (at least me ;-)


Thanks in advance,
Claude
__________________________________________________________________________
* This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
* Any unauthorized copying, disclosure, or distribution of the material
within
this email is strictly forbidden.
* Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Asset Management
Systems SA unless otherwise specifically stated.
* An electronic message is not binding on its sender.  Any message referring
to
a binding engagement must be confirmed in writing and duly signed.
* If you have received this email in error, please notify the sender
immediately
and delete the original.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message