Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 36269 invoked from network); 26 Jul 2002 13:47:33 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Jul 2002 13:47:33 -0000 Received: (qmail 24895 invoked by uid 97); 26 Jul 2002 13:47:45 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 24879 invoked by uid 97); 26 Jul 2002 13:47:45 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 24866 invoked by uid 98); 26 Jul 2002 13:47:44 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Reply-To: From: "Sean LeBlanc" To: "'Ant Users List'" Subject: RE: Best way to force an "arg" Date: Fri, 26 Jul 2002 07:47:22 -0600 Message-ID: <001701c234aa$f8356a10$1009a8c0@extrememotivation.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20020725220123.41172.qmail@web13402.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Diane Holt [mailto:holtdl@yahoo.com] > Sent: Thursday, July 25, 2002 4:01 PM > To: Ant Users List; sean@nutros.com > Subject: Re: Best way to force an "arg" > > > --- Sean LeBlanc wrote: > > What I want to do is to force at least one "arg" to be present, so > > I can define a branch of things to happen. What's the cleanest way > > to do this? > > > > I want something like: > > > > ant (foo|bar) > > > > but I want the build to exit if foo or bar do not exist on > the command > > line. > > You'd need to have either a .antrc (if you're *nix-based) file in > everyone's $HOME (or modify the 'ant' script to look for an rc file in > some more generalized location) that verifies the 'ant' > command line, or > you'd need to either modify the script to do the > verification, or put a > wrapper on top of the Ant wrapper script. As an example of an > rc file that > does arg verification, see: > http://marc.theaimsgroup.com/?l=ant-user&m=101364053529833&w=2 > > > I've tried some things (they didn't seem very elegant to me), but I > > ended up having troubles with the task. It says that unless > > is not a supported attribute? What gives with this? > I'm not sure how you'd be using to deal with > command-line args in > the first place, but as to the error, if/unless for is new to > Ant1.5. That would explain things...I'm using 1.4.x. The way I'm using fail with the "arg" is because it's not really an arg per se - it's another target, but I want to make one of two choice required as the first target given. The "arg"(target) is for building development vs. stable versions of the code. -- To unsubscribe, e-mail: For additional commands, e-mail: