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 66548 invoked from network); 14 Feb 2001 00:01:38 -0000 Received: from unknown (HELO mblfw3.macquarie.com.au) (203.28.95.251) by h31.sny.collab.net with SMTP; 14 Feb 2001 00:01:38 -0000 Received: by mblfw3.macquarie.com.au; id LAA04894; Wed, 14 Feb 2001 11:01:09 +1100 Received: from mblfw4(203.18.209.231) by mblfw3.macquarie.com.au via smap (V4.2) id xma028718; Wed, 14 Feb 01 10:54:06 +1100 Received: by mblfw4.macquarie.com.au; id KAA17961; Wed, 14 Feb 2001 10:54:06 +1100 Received: from isdserv3.macbank(10.123.0.32) by mblfw4.macquarie.com.au via smap (V4.2) id xma016887; Wed, 14 Feb 01 10:52:41 +1100 Received: from nt_syd_ex01.macbank (nt_syd_ex01 [10.124.15.10]) by isdserv3.macbank (8.9.1/8.9.1) with ESMTP id KAA07879 for ; Wed, 14 Feb 2001 10:52:40 +1100 (EST) Received: by nt_syd_ex01.macbank with Internet Mail Service (5.5.2650.21) id <16D9JCRM>; Wed, 14 Feb 2001 10:52:39 +1100 Message-ID: <67FE02381F67D3119F960008C7845A2C0201CFD7@nt_syd_ex09.macbank> From: Tim Vernum To: "'ANT-user'" Subject: RE: Passing input parameters to build.xml Date: Wed, 14 Feb 2001 10:52:33 +1100 X-Mailer: Internet Mail Service (5.5.2650.21) X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > 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.