Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 79398 invoked from network); 8 Jan 2008 06:06:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2008 06:06:27 -0000 Received: (qmail 75647 invoked by uid 500); 8 Jan 2008 06:06:13 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 75610 invoked by uid 500); 8 Jan 2008 06:06:13 -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 75599 invoked by uid 99); 8 Jan 2008 06:06:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2008 22:06:12 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.109.238.66] (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jan 2008 06:05:48 +0000 Received: from z011100.bk.fin.local (z011100.bk.fin.local [172.18.101.140]) by dnsinet.rzf-nrw.de (8.14.0/8.14.0) with ESMTP id m0865pK1021277 for ; Tue, 8 Jan 2008 07:05:51 +0100 Received: from z011034.bk.fin.local ([130.11.7.34]) by z011100.bk.fin.local with Microsoft SMTPSVC(6.0.3790.1830); Tue, 8 Jan 2008 07:05:51 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: AW: Easier Way To Check and Install jars Date: Tue, 8 Jan 2008 07:05:51 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Easier Way To Check and Install jars Thread-Index: AchRtuA39+G1R21OSaaScqEX/tWPRQAA12mg References: <560289D8-FE07-46D5-8C46-61A1A5757CFC@gmail.com> From: To: X-OriginalArrivalTime: 08 Jan 2008 06:05:51.0514 (UTC) FILETIME=[857A37A0:01C851BC] X-Virus-Checked: Checked by ClamAV on apache.org > I wrote up a "short" install target in my ant file to make=20 > sure I have =20 > everything necessary to run script tasks, but it seems overly=20 > verbose =20 > for such a simple task: >=20 > You cant use properties in the if/unless attribute of the target. > > "Tools/Ant/${JarName}.jar" /> You are installing ${JarName}.jar from a relative path ("Tools/..." =3D "${basedir)/Tools") to=20 an absolute location ("/usr/..."), right? > >=20 > > share/ant/lib/${JarName}.jar" type =3D "file" /> Just "improvements": You should think about introducing a new property and use that > > >=20 > > > > Using instead of would be better: - convert the called target to (e.g. name=3D"installJar") - convert the s to >=20 > I'm still somewhat new to ant, so I feel like I may be doing things =20 > the hard way, is there any easier way to do this, namely one that =20 > involves combining Install-Jar and Copy-Jar tasks? Easier would be just to do a=20 =09 would check if the target file exists or is older than the copied file and skip copying if not. You dont have to copy the ant-apache-bsf-1.7.0.jar as it should be present because it's part of the Ant distro. Much more elegant would be using Ivy ... (I hope someone jumps in here ;) Jan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org