Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 5152 invoked from network); 30 Sep 2003 14:53:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Sep 2003 14:53:09 -0000 Received: (qmail 70146 invoked by uid 500); 30 Sep 2003 14:52:54 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 70109 invoked by uid 500); 30 Sep 2003 14:52:54 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 70096 invoked from network); 30 Sep 2003 14:52:53 -0000 Received: from unknown (HELO dave.cbc-companies.com) (68.22.157.6) by daedalus.apache.org with SMTP; 30 Sep 2003 14:52:53 -0000 Received: from emailsurf (avenue.cbc-companies.com [172.16.91.45]) by dave.cbc-companies.com (8.12.10/8.12.6) with ESMTP id h8UEquLL010179 for ; Tue, 30 Sep 2003 10:52:56 -0400 Received: from Unknown [172.16.91.58] by emailsurf - SurfControl E-mail Filter (4.6); Tuesday, 30 September 2003, 10:56:25 Received: by avenue with Internet Mail Service (5.5.2653.19) id ; Tue, 30 Sep 2003 10:55:23 -0400 Message-ID: From: Mark Lybarger To: "'Ant Users List'" Date: Tue, 30 Sep 2003 10:55:18 -0400 Subject: RE: pass parameters from build.xml to my shell script ?? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Mailer: Internet Mail Service (5.5.2653.19) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I'm not familiar with executing shell scripts like that. i'm familiar with using $1 $2, etc for parameters passed to unix shell scripts. then setting local variables inside the script such as: export ANT-PATCH=$1 export WEBLOGIC-JAR=$2 etc, etc. you'll want to use ant -debug or some such (see ant -help > -----Original Message----- > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] > Sent: Tuesday, September 30, 2003 10:41 AM > To: Ant Users List > Subject: Re: pass parameters from build.xml to my shell script ?? > > > This is exactly what i wanted to do: > > ------------------------------------------ > > i have 3 files in all.... > > > 1) build.xml looks something like: > > > > > > > > > > value="${general.script}" /> > > > > executable="${Deploy.scripts.folder}/${genera > l.deployment.script.name}" /> > > > ADMIN-PORT-NUMBER="${ADMIN-PORT-NUMBER-TEST}"/> // is this > correct ???? > // is this > correct ??? > -- > -- > -- > > // i need to pass the paramter from here that is been defined > in myAnt.properties file to the actual shell script called > "deployScript.sh" > // correct me if iam wrong ....i need to specify all the arg > names of the shell script OR the arg name of the > myAnt.properties file?????? > // iam confused !!!!!!!!!! > > > > > > > > 2) myAnt.properties > > general.script=deployScript.sh > ANT-PATCH=/user/bea/wlserver6.1/lib/patch.jar > WEBLOGIC-JAR=/user/bea/wlserver6.1/lib/weblogic.jar > ADMIN-PORT-NUMBER-TEST=7001 > HOSTNAME-TEST=reliant2 > APP-NAME-TEST=beaMon > SERVER-NAME-TEST=beamon_biko_s1 > PASSWORD-TEST=weblogic > APP-PATH-DEPLOYED-FROM-TEST=/export/home/muuserid/applications > /beamon/beaMon.war > > > > 3) a shell script called "deployScript.sh" looks something like this: > > java -cp "$ANT-PATCH":"$WEBLOGIC-JAR" weblogic.deploy -port > "$ADMIN-PORT-NUMBER" -host "$HOSTNAME" -component > "$APP-NAME":"$SERVER-NAME" deploy "$PASSWORD" "$APP-NAME" > "$APP-PATH-DEPLOYED-FROM" > > ------------------------------------------- > > > > > > Shawn wrote: > Sorry I was going out the door and just didn't have the time. > > I do things like: > > > > > > > > > or > > outputproperty="the_value"> > > > > > > > or > > > > output="${log.dir}/mysql_backup_b.txt"> > ${home.dir}/ant_backup/mysql/hotcopy" /> > > > done > > > > Anyway what would your command line look like if you launched > your script > from the shell. > > You can just break that up using or using > (see the docs for the diff and more details). > > (all the above are actually executables but I believe passing > parameters to > a script would be the same.) > > > >> iam checking the docs right now....and could find something like: > >> > >> > >> > >> but how could i make this to match with the shell script > >> variables.....iam > > new to ANT/shell script. > >> > >> if you can let me know some examples, that would be great !!!! > >> > >> -shailesh > >> > >> > >> Shawn wrote: > >> > >> easy enough, just check the docs under exec. > >> > >> There are several ways to do and it's probably better for > you to see it > >> there than me try to explain it here. > >> > >> > >> > > >> > Hi, > >> > > >> > I want to pass some parameters from my build.xml file to > the shell > >> > script. Iam envoking my shell scripts from the build.xml > file(using > > exec) > >> > but i need some paramters to be passed to these shell scripts. > >> > > >> > > >> > > >> > Please advise. > >> > > >> > > >> > > >> > shailesh > >> > > >> > > >> > > >> > --------------------------------- > >> > Do you Yahoo!? > >> > The New Yahoo! Shopping - with improved product search > >> > >> > >> > >> -- Shawn > >> > >> Happily using M2, Opera's revolutionary e-mail client: > >> http://www.opera.com/m2/ > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > >> For additional commands, e-mail: user-help@ant.apache.org > >> > >> > >> --------------------------------- > >> Do you Yahoo!? > >> The New Yahoo! Shopping - with improved product search > > > > > > -- > Shawn > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > > --------------------------------- > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org