Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 60090 invoked from network); 14 Jun 2002 04:33:39 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 14 Jun 2002 04:33:39 -0000 Received: (qmail 1847 invoked by uid 97); 14 Jun 2002 04:33:49 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 1795 invoked by uid 97); 14 Jun 2002 04:33:48 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 1783 invoked by uid 98); 14 Jun 2002 04:33:48 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: Fri, 14 Jun 2002 00:33:35 -0400 (EDT) From: bob mcwhirter X-Sender: bob@exeter.exeter.org To: Jakarta Commons Developers List Subject: Re: [CLI] multiple args In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thu, 13 Jun 2002, Michael A. Smith wrote: > On Fri, 14 Jun 2002, bob mcwhirter wrote: > > > > Any thoughts on how to hack in multiple-instances-single-arg options > > > > without adding yet-another-boolean-parameter to all of the signatures? > > > > > > How about an "end-of-list" marker: > > > > > > maven -D macen.username=werken -- maven:deploy-site > > > > While technically a good solution, it breaks compatibility with other > > tools such as javac, ant, make, and most any other compiler out there. > > except that I don't think any of those allow arbitrary number of > options unless they are last on the command line. Most options take > only a single argument and when they take multiple you're usually stuck > with specifying the option multiple times, once per argument. So, I'm > not exactly sure how its not compatible. No, that's exactly what I want. I'd be happy if I had to do this: maven -Done -Dtwo -Dthree=value myTarget That'd be just dandy by me. Basically, just trying to reproduce javac's -D flag. javac doesn't allow javac -D one two three=value MyClass and it doesn't require javac MyClass -D one two three=value or javac -D one two three=value -- MyClass but, it does allow/require javac -Done -Dtwo -Dthree=value MyClass And that's what I want. > I'm not sure how much Ant's command-line interface has changed since I > last did much in-depth playing with Ant, but from what I remember their > command syntax was similar to this: > > ant [options] target [target ...] > > None of the options allowed more than one argument, You're right. But, you can specify the -D multiple times on the command-line. > Maybe I need to look more into CLI -- I might be missing something... > it's been on my todo list for way too long now. :) Yah know, maybe I do too. I was thinking that if I said 'false' to allowMultipleArgs parameter that I could only use -D once on the command-line. Maybe not. I'll go experiment. -bob -- To unsubscribe, e-mail: For additional commands, e-mail: