Conor MacNeill wrote:
>
> From: "Tim Vernum" <[EMAIL PROTECTED]>
> > [EMAIL PROTECTED]
...
> > > ! 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
[EMAIL PROTECTED]