Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 40736 invoked from network); 19 Apr 2005 09:11:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2005 09:11:18 -0000 Received: (qmail 63426 invoked by uid 500); 19 Apr 2005 09:10:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 63318 invoked by uid 500); 19 Apr 2005 09:10:58 -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 63252 invoked by uid 99); 19 Apr 2005 09:10:57 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=DNS_FROM_RFC_ABUSE,NO_REAL_NAME,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of j.alkjaer@gmail.com designates 64.233.184.196 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.196) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 19 Apr 2005 02:10:54 -0700 Received: by wproxy.gmail.com with SMTP id 40so34701wri for ; Tue, 19 Apr 2005 02:10:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f2BvACm/H/xDKkpXmVg9jz0Ppzav4lhxAh8vq+6alo1DqWAO1lQ7hSGF7r78pYhzXEgZjinTEkhiXbjf7d0F6M4QYVkVN5sOuSMzTEaKlSDcZVPBd7V5EzbF896VVK28YXvaF20B+caL8GVwPNpPu7nv5PVlBAG0Xg8mkcmWWV8= Received: by 10.54.17.12 with SMTP id 12mr2368wrq; Tue, 19 Apr 2005 02:10:51 -0700 (PDT) Received: by 10.54.17.63 with HTTP; Tue, 19 Apr 2005 02:10:51 -0700 (PDT) Message-ID: Date: Tue, 19 Apr 2005 11:10:51 +0200 From: Reply-To: To: user@ant.apache.org Subject: taskdef classpath problem when invoking ant from java In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi there. I have a problem when invoking ant (1.6.1) from a Quartz job which is scheduled in a webapp I have placed the following ant jars in the webapps classpath (WEB-INF/lib) ant.jar ant-jakarta-log4j.jar (I attach a Log4jListner to my project) ant-launcher.jar (probably not needed) ant-nodeps.jar (I only allow the nodeps build in tasks for now ) I use the ProjectHelper to parse the build file similar to whats described = in The ant file that I invoke uses the ant-contrib () tasks, but Ant fails in since it cannot find the ant contrib reso= urce I have placed the ant-contrib.jar below WEB-INF/lib along with the other, so it's on the webapp's classpath, and if I "manually" add the tasks using project.addTaskDefinition(...) the tasks can be used in the build.xml (that tells me that the ant-contrib.jar is on the classpath of the quartz thread) Doing the taskdef''s in my Quartz job is not really an option however, since I would like to keep the job generic, and placing the ant-contrib.jar somewhere in the filesystem so that the build.xml can explicitly reference it, is not what I want since that requires me to manually place the jar somewhere in the filesystem (I can't rely on the j2ee container actually extracting the war file and placing the ant-contrib.jar in some calculable path ) An extra "oddity" is that the SQL task that my ant file uses, has no trouble finding the JDBC driver which is also in the WEB-INF/lib dir So my question is : Is there any way of having taskdef pick up classes from the invoking classloader? /Johal --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org