Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 32777 invoked from network); 28 May 2008 09:08:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2008 09:08:35 -0000 Received: (qmail 31825 invoked by uid 500); 28 May 2008 09:08:32 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 31798 invoked by uid 500); 28 May 2008 09:08:32 -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 31787 invoked by uid 99); 28 May 2008 09:08:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 02:08:32 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chris.green100@googlemail.com designates 209.85.200.169 as permitted sender) Received: from [209.85.200.169] (HELO wf-out-1314.google.com) (209.85.200.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 09:07:42 +0000 Received: by wf-out-1314.google.com with SMTP id 23so2788126wfg.10 for ; Wed, 28 May 2008 02:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=xkj/c1LwHuh4nsczWFByLeuJiXcwXKr21G+gs2un5fI=; b=qryNY5DCLeNdY05XGngUATb2lR1JVTzqIUQEIja2vzvM0OBYap0lc2rIgtVjmJ4AF1mxeOeDAEZ2DMn+OMfMMg9LRdYCknxEb7rfQCZvT6wTQFM2xZvccboG3FJpCRubTV/KaF+FFxKv8KVbikpR5aCqXSBIeCguzH8oMhWcp4Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FgEEEcyIGLLZYqmSW/Zn8aevNqIEoJo2WcDh33sceiYA6BA5wCb906Y6lx+uiHIClYdzhAt4x16eo0n3gwuygCPgCsj/PtT+BypxM6qV1gLH3MWRimNPptGm+ikl7svA5t4YvbUTTx8z6U3ulqjyucv02QoDu0EmTZIoNSibr9A= Received: by 10.142.211.10 with SMTP id j10mr927726wfg.202.1211965676978; Wed, 28 May 2008 02:07:56 -0700 (PDT) Received: by 10.143.29.2 with HTTP; Wed, 28 May 2008 02:07:56 -0700 (PDT) Message-ID: Date: Wed, 28 May 2008 11:07:56 +0200 From: "Chris Green" To: "Ant Users List" Subject: Re: Calling a cmd batch file from Ant In-Reply-To: <06080D44730F41428BAF2168FA8BDD8001F6E91F@icsrv02.icongmbh.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5020_23285693.1211965676962" References: <06080D44730F41428BAF2168FA8BDD8001F6E8FD@icsrv02.icongmbh.de> <06080D44730F41428BAF2168FA8BDD8001F6E91F@icsrv02.icongmbh.de> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5020_23285693.1211965676962 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline But doesn't setting the ineritall to false mean that the script you are calling won't have access to properties you have set up ? On Wed, May 28, 2008 at 11:03 AM, Knuplesch, Juergen < Juergen.Knuplesch@icongmbh.de> wrote: > But if you use or it is like you would start ANT a secon= d > time. Therfore the properties > are set in the target or script that you call. The old values are lost if > you use the attribute > Inheritall=3Dfalse > And using inside sets some properties to a value you > define. > > > > -- > J=FCrgen Knuplesch > -----Urspr=FCngliche Nachricht----- > Von: Chris Green [mailto:chris.green100@googlemail.com] > Gesendet: Mittwoch, 28. Mai 2008 10:56 > An: Ant Users List > Betreff: Re: Calling a cmd batch file from Ant > > Jan > > Unless I'm missing something here, that wouldn't work. > > You can't redefine an ant property one it has already been defined in one > specific execution of the said script. > > That's why I was trying to get the batch file to set up an environment > variable before executing the generic component.xml > > Chris > > On Wed, May 28, 2008 at 10:49 AM, wrote: > > > But in your original post you have specified the component in your > > batch file. > > > > > > Batch file contents are :- > > > > > > > > > > > > set component=3Dcommon > > > > > > ant -f %build.dir%/component.xml > > > > Where is the difference? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Build one: ${one} > > Build two: ${two} > > > > > > one.properties: > > # Specifies which parts for component 'one' to do one=3DJ two=3DN > > > > two.properties: > > # Specifies which parts for component 'one' to do one=3DJ two=3DJ > > > > > > > > Jan > > > > > > > > > -----Urspr=FCngliche Nachricht----- > > > Von: Chris Green [mailto:chris.green100@googlemail.com] > > > Gesendet: Mittwoch, 28. Mai 2008 10:36 > > > An: Ant Users List > > > Betreff: Re: Calling a cmd batch file from Ant > > > > > > Can't use ant or antcall's even in a nested structure. Reason being > > > :- > > > > > > Script process designed to build numerous components of an > > > application. > > > > > > Each of these components has a parameter set up in the properties > > > file set to Y or N to define whether that component is built during > > > that execution of the script. > > > > > > Therefore, more than one component may need to be built during one > > > execution of the build script. > > > > > > On this basis, the controlling ant script, build.xml cannot have the > > > component variable defined within it, even nested, as it potentially > > > needs to be redefined multiple times. > > > > > > The component.xml file (generic) which is called again and again for > > > each component that needs to be build. Want to keep this generic and > > > as simple as possible. Therefore no hard coding using if statements > > > to set the 'component' variable. > > > > > > On Wed, May 28, 2008 at 10:05 AM, Knuplesch, Juergen < > > > Juergen.Knuplesch@icongmbh.de> wrote: > > > > > > > If you use Task or you can run the target > > > with different > > > > content of a property. > > > > E.g. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I even use this in loops made with antcontrb. > > > > > > > > > > > > > > > > -- > > > > J=FCrgen Knuplesch www.icongmbh.de > > > > icon Systemhaus GmbH Tel. +49 711 806098-275 > > > > Sophienstra=DFe 40 > > > > D-70178 Stuttgart Fax. +49 711 806098-299 > > > > > > > > Gesch=E4ftsf=FChrer: Uwe Seltmann > > > > HRB Stuttgart 17655 > > > > USt-IdNr.: DE 811944121 > > > > -----Urspr=FCngliche Nachricht----- > > > > Von: Chris Green [mailto:chris.green100@googlemail.com] > > > > Gesendet: Mittwoch, 28. Mai 2008 09:51 > > > > An: Ant Users List > > > > Cc: Jan.Materne@rzf.fin-nrw.de > > > > Betreff: Re: Calling a cmd batch file from Ant > > > > > > > > The reason I'm not using ant is that :- > > > > > > > > 1. My main build.xml script calls the component.xml script > > > numerous times. > > > > 2. Each time the component.xml script is called, the > > > variable 'component' > > > > needs to be set to something different. > > > > 3. Component.xml is generic therefore don't want to hard > > > code anything > > > > variables in 4. Once variable set, can't be changed. > > > > > > > > Honestly, there is some underlying logic behind all of this. > > > > > > > > Chris > > > > > > > > On Wed, May 28, 2008 at 9:41 AM, wrote= : > > > > > > > > > > I am calling a dos batch file from an Ant script using > > > the following > > > > > > code :- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On the assumption that I get the Microsoft Windows > > > Copyright info > > > > > > appear, I assume the above commands are running ok. The > > > only trouble > > > > > > is, the contents / commands in the batch file don't seen to > > > > > > get executed. > > > > > > > > > > > > > > > http://ant.apache.org/faq.html#batch-shell-execute > > > > > > > > > > > > > > > > Batch file contents are :- > > > > > > > > > > > > set component=3Dcommon > > > > > > ant -f %build.dir%/component.xml > > > > > > > > > > Why not use ? > > > > > > > > > > > > > > > Jan > > > > > > > > > > > > > -------------------------------------------------------------------- > > > - > > > > > 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 > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > 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 > > ------=_Part_5020_23285693.1211965676962--