ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Gill" <>
Subject Re: Custom Ant Task with 3rd party library dependency
Date Tue, 03 May 2005 14:36:11 GMT
Hi ,

Yes I have tried that (well a variety of this type of thing) and it is not 
working for me...

In my 'main' build.xml file I do this:

<typedef resource="org/appfuse/ant/appfuse-contrib.xml"

Then, in my appfuse-contrib.xml file I do:

<?xml version="1.0"?>

   <taskdef name="renamepackages"


But whatever I try setting either classpath to (or even if I use inline 
classpath, or classpathref), my custom ant task cannot find the spring 

Is it possible what I am trying to do?  Eric's article + other postings I 
have read seem to suggest, the only two ways of using 3rd party classes from 
wthin a custom task is to ether a) kick off a new JVM task or b) put the 
jars in the System classpath (ie. ANT_HOME/lib)..

Can anyone confirm either way??

&gt;From: Ivan Ivanov &lt;;
&gt;Reply-To: &quot;Ant Users List&quot; &lt;;
&gt;To: Ant Users List &lt;;
&gt;Subject: Re: Custom Ant Task with 3rd party library dependency
&gt;Date: Tue, 3 May 2005 07:01:41 -0700 (PDT)
&gt;MIME-Version: 1.0
&gt;Received: from ([]) by with Microsoft SMTPSVC(6.0.3790.211); Tue, 3 May 2005 
07:25:53 -0700
&gt;Received: (qmail 53754 invoked by uid 500); 3 May 2005 14:03:33 -0000
&gt;Received: (qmail 53741 invoked by uid 99); 3 May 2005 14:03:32 -0000
&gt;Received: pass ( local policy)
&gt;Received: from (HELO 
(  by (qpsmtpd/0.28) with SMTP; Tue, 03 May 2005 
07:03:32 -0700
&gt;Received: (qmail 92243 invoked by uid 60001); 3 May 2005 14:01:42 -0000
&gt;Received: from [] by via HTTP; 
Tue, 03 May 2005 07:01:41 PDT
&gt;X-Message-Info: JGTYoYF78jFXHutfHRffa3R5qXkgYW5muIU6wkBHhUc=
&gt;Mailing-List: contact; run by ezmlm
&gt;Precedence: bulk
&gt;List-Unsubscribe: &lt;;
&gt;List-Subscribe: &lt;;
&gt;List-Help: &lt;;
&gt;List-Post: &lt;;
&gt;List-Id: &quot;Ant Users List&quot; &lt;;
&gt;Delivered-To: mailing list
&gt;X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
&gt;Comment: DomainKeys? See
&gt;DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;  s=s1024;;  

&gt;X-Virus-Checked: Checked
&gt;X-OriginalArrivalTime: 03 May 2005 14:25:53.0590 (UTC) 
&gt;Hello Ben,
&gt;Have you tried with to &lt;taskdef&gt; your custom task with
&gt;classpath nested tag:
&gt;&lt;taskdef classname=&quot;org.myorg.MyTask&quot;&gt;
&gt;   &lt;classpath&gt;
&gt;   &lt;!-- location to your jars here --&gt;
&gt;   &lt;/classpath&gt;
&gt;HTH Ivan
&gt;--- Ben Gill &lt;; wrote:
&gt; &gt; Hi,
&gt; &gt;
&gt; &gt; My custom Ant task relies on the Spring jar files,
&gt; &gt; but whatever I try, I get
&gt; &gt; a class not found exception..
&gt; &gt;
&gt; &gt; I read a lot of posts on this and saw Eric's article
&gt; &gt; here:
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; But I cannot believe I have to spawn off a JVM to
&gt; &gt; pick up the spring jar's
&gt; &gt; do I?
&gt; &gt;
&gt; &gt; and I really dont want to force any user that uses
&gt; &gt; my task to copy the jar's
&gt; &gt; into their $ANT_HOME/lib...
&gt; &gt;
&gt; &gt; Has anyone got a nice, tidy way of making 3rd party
&gt; &gt; jar files available to a
&gt; &gt; custom task?
&gt; &gt;
&gt; &gt; Thanks
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; To unsubscribe, e-mail:
&gt; &gt;
&gt; &gt; For additional commands, e-mail:
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;Do you Yahoo!?
&gt;Yahoo! Small Business - Try our new resources site!
&gt;To unsubscribe, e-mail:
&gt;For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message