Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 48769 invoked from network); 14 Feb 2001 14:51:22 -0000 Received: from livewirecorp.com (HELO ns1.livewirecorp.com) (12.33.154.10) by h31.sny.collab.net with SMTP; 14 Feb 2001 14:51:22 -0000 Received: FROM exchange.livewirecorp BY ns1.livewirecorp.com ; Wed Feb 14 09:45:21 2001 -0500 Received: by exchange_server.livewirecorp with Internet Mail Service (5.5.2650.21) id <1FK80CMX>; Wed, 14 Feb 2001 09:50:39 -0500 Message-ID: From: Tamara Mishiyeva To: "'ant-user@jakarta.apache.org'" Subject: RE: Passing input parameters to build.xml Date: Wed, 14 Feb 2001 09:50:38 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C09695.7F007EAA" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C09695.7F007EAA Content-Type: text/plain; charset="iso-8859-1" Tim and Conor, Thanks a lot. -Tamara -----Original Message----- From: Conor MacNeill [mailto:conor@cortexebusiness.com.au] Sent: Tuesday, February 13, 2001 7:13 PM To: ant-user@jakarta.apache.org Subject: RE: Passing input parameters to build.xml I just thought that I would add that you should only be using build.sh if you are building ant itself. If you just want to use ant, you should be using the ant script or running the ant Java class directly. Conor > From: Tim Vernum [mailto:Tim.Vernum@macquarie.com.au] > > > > Is there any way to pass parameters from build.sh to build.xml script? > > (for example, build.sh accepts some parameters from the command > line and has to pass them to build.xml) > > Yes. > You need to use the "-D" syntax, eg > ant -D"some.property=$1" target > > Then you could refer to it int the ant build.xml as > ${some.property} > > If you don't know how many args you need you could do something > like (untested) > > ANT_DEFINES="" > ARG_NUM=1 > while [ $# -ge 1 ] > do > ANT_DEFINES="${ANT_DEFINES} -Darg${ARG_NUM}=$1" > shift > let ARG_NUM=$ARGNUM+1 > done > > ant ${ANT_DEFINES} > > But then you have the problem of working out how to deal with them in ant. > > ------_=_NextPart_001_01C09695.7F007EAA Content-Type: text/html; charset="iso-8859-1" RE: Passing input parameters to build.xml

Tim and Conor,
Thanks a lot.
-Tamara

-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Sent: Tuesday, February 13, 2001 7:13 PM
To: ant-user@jakarta.apache.org
Subject: RE: Passing input parameters to build.xml


I just thought that I would add that you should only be using build.sh if
you are building ant itself. If you just want to use ant, you should be
using the ant script or running the ant Java class directly.

Conor

> From: Tim Vernum [mailto:Tim.Vernum@macquarie.com.au]
>
>
> > Is there any way to pass parameters from build.sh to build.xml script?
> > (for example, build.sh accepts some parameters from the command
> line and has to pass them to build.xml)
>
> Yes.
> You need to use the "-D" syntax, eg
>       ant -D"some.property=$1" target
>
> Then you could refer to it int the ant build.xml as
>       ${some.property}
>
> If you don't know how many args you need you could do something
> like (untested)
>
> ANT_DEFINES=""
> ARG_NUM=1
> while [ $# -ge 1 ]
> do
>       ANT_DEFINES="${ANT_DEFINES} -Darg${ARG_NUM}=$1"
>       shift
>       let ARG_NUM=$ARGNUM+1
> done
>
> ant ${ANT_DEFINES}
>
> But then you have the problem of working out how to deal with them in ant.
>
>

------_=_NextPart_001_01C09695.7F007EAA--