ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <Daniel.Barc...@digitalfocus.com>
Subject Re: [Bug 1326] Changed - "ant -find -projecthelp" fails, even in build file directory
Date Wed, 09 May 2001 14:55:55 GMT
Conor MacNeill wrote:
> 
> From: "Tim Vernum" <Tim.Vernum@macquarie.com.au>
> > Daniel.Barclay@digitalfocus.com
...
> > > ! Can you consider using the syntax "-find=xxx.xml" (that is,
> > > "-find" activates
> > > ! the find feature with the default file name; "-find=x.xml"
> > > activates it and
> > > ! sets the file name for which to search)?
> >
> >
> > FWIW, I agree entirely with Daniel.
> >
> 
> Interestingly, the windows shell will remove the "=" in that argument and
> pass two arguments to Ant. Wierd. huh? 

Yeah, I was thinking of Unix shells.  Darn...excuse me, I mean...DAMN Windows!


> Since we have a -f argument already,

(What's "-f"?  Is that a renamed value of Ant 1.3's "-buildfile" option?)

> I suggest we make -find not take an argument and use the -f argument to
> denote the file to be found.

Could we overload -buildfile slightly as in the following, or would this 
cause problems?:

ant ...
  - looks in the current directory for a file with the default build file name 
    (build.xml)

ant -find ...
  - searches up the directory hierarchy for a file with default build file name 
    (build.xml)

ant        -buildfile [some file pathname] ...
  - looks for the specified file (evaluates the possibly-relative pathname 
    relative to the current directory)

and -find -buildfile [some file pathname, usually simple (no slashes)] ...
  - searches up the directory hierarchy for a file with the specified name
    (evaluates the possibly-relative pathname relative to each directory)
    
    Note, although the file pathname would _usually_ be a simple name (no 
    slashes; e.g., MyName.xml), it shouldn't be restricted to a simple name.  

    Something like "ant -find -buildfile scripts/build.xml" would be useful
    if you grouped Ant files into a separate subdirectory (e.g., if you
    had many properties files and/or divided things into multiple XML
    external entity files).

    (Note: I just checked "ant -find dir/filename.xml" and it seems to work
    already.)

Daniel
-- 
Daniel Barclay
Digital Focus
Daniel.Barclay@digitalfocus.com

Mime
View raw message