Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 67849 invoked from network); 28 Feb 2006 15:40:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Feb 2006 15:40:42 -0000 Received: (qmail 33549 invoked by uid 500); 28 Feb 2006 15:40:34 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 33502 invoked by uid 500); 28 Feb 2006 15:40:33 -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 33491 invoked by uid 99); 28 Feb 2006 15:40:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2006 07:40:33 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jakob.fix@gmail.com designates 66.249.82.192 as permitted sender) Received: from [66.249.82.192] (HELO xproxy.gmail.com) (66.249.82.192) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2006 07:40:31 -0800 Received: by xproxy.gmail.com with SMTP id s16so747831wxc for ; Tue, 28 Feb 2006 07:40:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ai4iI707JISr+lORlxBgzwl7cMniV79IcuTyxxsri4IX/Y3Q+Y+gu/PHtK8MqUnv7zUJEG/ZUboR6TJOCsDF7WBBusbITf4C7hds55AJ9GmZ5JeHh+NtkTgso4oZqKvcD7YP/EMhMZYLjPA27YKtCpxGQfOKIanhGFvjX1ACb/s= Received: by 10.70.88.17 with SMTP id l17mr649763wxb; Tue, 28 Feb 2006 07:40:10 -0800 (PST) Received: by 10.70.24.1 with HTTP; Tue, 28 Feb 2006 07:40:10 -0800 (PST) Message-ID: Date: Tue, 28 Feb 2006 16:40:10 +0100 From: "Jakob Fix" To: "Ant Users List" Subject: Re: command line target available from inside build script? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Alex, On 2/28/06, schmaxelander wrote: > Hi Jakob, > > what exactly is your question? > If the target is available from commandline, its available from within > the script, too. What is you error message? Did you really name your > script file "generic.build"? I'm not having problems, really :-). I was just curious whether I could use the name of the target as given on the command line in the script as a means of influencing the script execution. OK, an example. I have one source, and three different build targets "cdrom", "intranet", "internet". The differences between the targets are relatively minimal, for example: "disable any logs" for the cdrom target (the application runs from cdrom), or "display general conditions" unless the target is intranet, etc. Currently I have three build files (yes, they are called like this :-)) - cdrom.build - intranet.build - internet.build which take care of the above-mentioned specifics. if possible, I'd like to have one generic.build file where I just supply the platform target, like this ant -f generic.build {cdrom|intranet|internet} inside the script a property will get assigned the target's value, and I can then use this property to decide whether or not I want to execute the "enable-log-mechanism" and "disable-general-conditions", etc. mmh, if there are better ways I'm open for them. thanks for your reply. > Regards, > Alex Hybel > > --- In apache-ant@yahoogroups.com, "Jakob Fix" wrote: > > > > Hi, > > > > I was wondering whether the target given on the command line like this > > > > ant -f generic.build server > > > > (i.e. "server" in this example) is available from within the ant > > script, like ${target}. apparently, it's not ${target} because > > otherwise I wouldn't have asked, I tried that, and yes, the > > documentation keeps shtum as well. > > > > thanks in advance. > > > > > > -- > > cheers, > > Jakob. -- cheers, Jakob. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org