Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 99307 invoked from network); 13 Aug 2002 13:41:40 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 13 Aug 2002 13:41:40 -0000 Received: (qmail 6329 invoked by uid 97); 13 Aug 2002 13:41:54 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 6299 invoked by uid 97); 13 Aug 2002 13:41:53 -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 6274 invoked by uid 98); 13 Aug 2002 13:41:53 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <20020813134125.8085.qmail@web11001.mail.yahoo.com> Date: Tue, 13 Aug 2002 06:41:25 -0700 (PDT) From: James Bullington Subject: Re: How to provide usage instructions with my targets To: Ant Users List In-Reply-To: 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 My way to do it would be to have check targets like the following: And then change your target specified below to have: If you would like more, let me know and I'll try to flesh this out. --- Ext-Mike.Hogan@nokia.com wrote: > Hi, > > In short form, my question is, if I have a target that requires > parameters on the command line, how can I print usage instructions if > a user fails to supply some or all of the required parameters. I > would prefer to avoid chaining targets with complimentary if and > unless clauses. > > In long form, my question is this. I have the following target: > > > > > > > > > > > > > ${outdir}, ${package} and ${wsdl} are to be supplied by an external > actor (and person or another build.xml file). If any of there are > unset, I would like the following usage message printed: > > "usage: ant ws.genstubs -Doutdir= -Dpackage= > -Dwsdl= > where outdir is the directory the generated stubs will go and > package is the name of the java package into which to put the code > and > wsdl file is the path to the WSDL file." > > I could imagine Ant allowing me to write a target like this: > > required="outdir,package,wsdl"> > > Then I just define the ws.genstubs.usage target to echo the required > message. > > Anyway, in the absence of this syntax, ss there any way to do this > elegantly using existing Ant features? > > Many thanks, > Mike. > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > ===== "Those who live in the shelter of the Most High will find rest in the shadow of the Almighty. This I declare of the Lord: He alone is my refuge, my place of safety; he is my God, and I am trusting him�" Psalms 91:1-2 (New Living Translation) __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: For additional commands, e-mail: