Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 71723 invoked from network); 28 Feb 2006 15:48:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Feb 2006 15:48:45 -0000 Received: (qmail 50480 invoked by uid 500); 28 Feb 2006 15:48:32 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 50432 invoked by uid 500); 28 Feb 2006 15:48:30 -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 50420 invoked by uid 99); 28 Feb 2006 15:48:30 -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:48:30 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2006 07:48:29 -0800 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id EA89E37093 for ; Tue, 28 Feb 2006 15:48:07 +0000 (GMT) Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14738-04-28 for ; Tue, 28 Feb 2006 15:48:06 +0000 (GMT) Received: from kropotkin.hpl.hp.com (kropotkin.hpl.hp.com [15.144.59.2]) by tobor.hpl.hp.com (Postfix) with ESMTP id 510723708B for ; Tue, 28 Feb 2006 15:48:06 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id 0FFF88F6D for ; Tue, 28 Feb 2006 15:48:05 +0000 (GMT) Received: from kropotkin.hpl.hp.com ([127.0.0.1]) by localhost (kropotki [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14060-01-4 for ; Tue, 28 Feb 2006 15:48:01 +0000 (GMT) Received: from timmay.hpl.hp.com (timmay.hpl.hp.com [15.144.30.251]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id A77D5BF11 for ; Tue, 28 Feb 2006 15:48:01 +0000 (GMT) Received: from [15.144.25.135] (chamonix.hpl.hp.com [15.144.25.135]) by timmay.hpl.hp.com (8.13.2/8.13.2) with ESMTP id k1SFluKI022393 for ; Tue, 28 Feb 2006 15:47:57 GMT Message-ID: <440470AC.9050106@apache.org> Date: Tue, 28 Feb 2006 15:47:56 +0000 From: Steve Loughran User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Ant Users List Subject: Re: command line target available from inside build script? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPLB-IMAP-MailScanner-Information: Please contact the Helpdesk for more information X-HPLB-IMAP-MailScanner: Found to be clean X-HPLB-IMAP-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-Virus-Scanned: amavisd-new at kropotkin.hpl.hp.com X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jakob Fix wrote: > 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 doesnt set the name of the target. What happens if there is more than one target on the command line? What if you are being called from an outer build file that has different names? It wouldn't scale. use a property: ant -f generic.build -Dtarget=cdrom --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org