Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 98390 invoked from network); 25 Feb 2007 20:15:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2007 20:15:30 -0000 Received: (qmail 2995 invoked by uid 500); 25 Feb 2007 20:15:29 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 2817 invoked by uid 500); 25 Feb 2007 20:15:29 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 2755 invoked by uid 99); 25 Feb 2007 20:15:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Feb 2007 12:15:28 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [192.114.47.67] (HELO smtp5.actcom.co.il) (192.114.47.67) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Feb 2007 12:15:16 -0800 Received: from yadan.net (l85-130-138-23.broadband.actcom.net.il [85.130.138.23]) by smtp5.actcom.co.il (8.13.8/8.13.8) with ESMTP id l1PKElZO026937 for ; Sun, 25 Feb 2007 22:14:52 +0200 Received: from localhost (localhost [127.0.0.1]) by yadan.net (Postfix) with ESMTP id E25CA22020D for ; Sun, 25 Feb 2007 22:14:54 +0200 (IST) Received: from yadan.net ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RB1KShouaWUM for ; Sun, 25 Feb 2007 22:14:54 +0200 (IST) Received: from [10.0.0.1] (main [10.0.0.1]) by yadan.net (Postfix) with ESMTP id A5B442201D0 for ; Sun, 25 Feb 2007 22:14:54 +0200 (IST) Message-ID: <45E1EE38.2090204@yadan.net> Date: Sun, 25 Feb 2007 22:14:48 +0200 From: Omry Yadan User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: Ant Users List Subject: Re: Adding optional tasks classpath from build.xml? References: <45E1A81F.9080105@yadan.net> In-Reply-To: X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Antoine, The task I am trying to use is a 'built-in' optional task, specifically - antlr. to my knowledge, I can't define it using a taskdef directive. Antoine Levy-Lambert wrote: > Hello Omry, > > it is good practice to work the way you envision to do. > > The manual page for junit > http://ant.apache.org/manual/OptionalTasks/junit.html gives some > informations concerning this question. > > Supposing junit is one of the optional tasks for which you want to use > a version stored in the directory tree of the build file, you can > choose the option <5> from the manual page (assuming you are using ant > 1.7.0) > > So you would add in your build file this line > > classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" > classpath="lib/junit/junit-x.y.z.jar"/> > > assuming you have ant-junit.jar under $ANT_HOME/lib (which is the > default if you use one of our releases) and you have a subdirectory > lib/junit with junit-x-y-z.jar in it in, relative to the basedir of > the build file. > > Best regards, > > Antoine > > > On Feb 25, 2007, at 10:15 AM, Omry Yadan wrote: > >> is it possible to add the reference to the required jars for an >> optional task as a part of the build.xml? >> similar to the way I can add my own tasks and keep them with the >> build.xml >> this will make build files much more portable across different >> machines, because it will be possible to bundle the build.xml with >> the jars required by the optional tasks it uses. >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org