Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 68272 invoked from network); 18 Feb 2003 16:07:45 -0000 Received: from dnsinet.rzf-nrw.de (193.109.238.66) by daedalus.apache.org with SMTP; 18 Feb 2003 16:07:45 -0000 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.3/8.12.3) with ESMTP id h1IG7igN017969 for ; Tue, 18 Feb 2003 17:07:44 +0100 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2653.19) id <1NDZ9BK9>; Tue, 18 Feb 2003 17:07:46 +0100 Message-ID: <879A5AD5DD0ED511891F0003473A9B5603CCC28E@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: AW: AW: Conditional target execution based on prerequisite execut ion Date: Tue, 18 Feb 2003 17:07:45 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2D767.DFF0AA90" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C2D767.DFF0AA90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is your solution? Jan Mat=E8rne -----Urspr=FCngliche Nachricht----- Von: Timothy Wall [mailto:twall@oculustech.com] Gesendet am: Dienstag, 18. Februar 2003 17:02 An: Ant Users List Betreff: Re: AW: Conditional target execution based on prerequisite execution The goal is not "run A before B" (although that may be a requirement). = The goal is "only run B if it is out of date". Ant by default runs=20 (almost) everything all the time. If B takes nonzero time to run, I *only* want it to run if B is "out of = date". Normally, a target would be considered out of date if a) any of its "depends" is out of date (and thus gets run) b) some other prerequisites are not satisfied (i.e. .java is newer than = .class, or the .jar file is not yet built) Some examples of standard conditional execution: idl parsing/code generation: generate .java code only if .idl files=20 have been modified jar file: only run jar if the class files it depends on have been=20 regenerated java compiler: only compile if .java is newer than .class The last is the only thing that I've seen ant handle automatically,=20 although I seem to have a knack for configuring things such that it=20 recompiles everything every time. On a complex project, typically you'll have many smaller targets with=20 internal dependencies (and some with prerequisit targets as=20 dependencies) and several overall targets that primarily consist of=20 prerequisite target dependencies (a jar file or shared library, for=20 instance). On Tuesday, February 18, 2003, at 10:23 AM, Jan.Materne@rzf.fin-nrw.de=20 wrote: > When you use the Ant framework = will > invoke A before B. Why setting a property? > > BTW the "onlyif" is > There is a unless=3D"propertyname", too. > > > Jan Mat=E8rne > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org ------_=_NextPart_001_01C2D767.DFF0AA90--