Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 63934 invoked from network); 3 May 2004 18:18:08 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 May 2004 18:18:08 -0000 Received: (qmail 13489 invoked by uid 500); 3 May 2004 18:17:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 13294 invoked by uid 500); 3 May 2004 18:17:49 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 13271 invoked from network); 3 May 2004 18:17:48 -0000 Received: from unknown (HELO mail27.messagelabs.com) (193.109.254.147) by daedalus.apache.org with SMTP; 3 May 2004 18:17:48 -0000 X-VirusChecked: Checked X-Env-Sender: CVedovini@odyssey-group.com X-Msg-Ref: server-17.tower-27.messagelabs.com!1083608271!10823259 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [62.50.73.22] Received: (qmail 15987 invoked from network); 3 May 2004 18:17:51 -0000 Received: from w1242.oams.com (62.50.73.22) by server-17.tower-27.messagelabs.com with SMTP; 3 May 2004 18:17:51 -0000 Received: by w1242.oams.com with Internet Mail Service (5.5.2657.72) id ; Mon, 3 May 2004 20:17:50 +0200 Message-ID: <7867C535D856D611A1240002B39B0EC201081071@w1241.oams.com> From: Claude Vedovini To: "'user@ant.apache.org'" Subject: Antlib & ClassLoading issues Date: Mon, 3 May 2004 20:17:17 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4313A.DE226CDE" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C4313A.DE226CDE Content-Type: text/plain; charset="iso-8859-1" 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 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 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. ------_=_NextPart_001_01C4313A.DE226CDE--