You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jason Dillon <ja...@planet57.com> on 2000/09/19 04:40:19 UTC

[PATCH] Main.java change to find the build file

Hello again.  Attached is a modification to Main.java that will attempt to
locate the build file if its location was not specified on the command
line.

I changed buildFile to default to null.  Then if buildFile is still null
after parsing options, findBuildFile() gets called, which basically does a
recursive search down (to the root... or is that up... not really sure
=) looking for `build.xml`.  If it doesn't find it, then it prints a
message and throws a BuildException.

I was going to check if buildFile was relative, then use it as the
target suffix for the search, but then the message about searching for a
build file kept coming up.  Perhaps this should be removed?

I have found that this feature is essential for my day-to-day work.  I
currently have a /bin/sh script that does this for me (so I don't have to
type out the entire path to the build file).  I tend to work on lots of
different projects (oss and internal) and this make life much easier,
knowning that it doesn't matter what directory I am in (as long as there
is a build.xml file somewhere up the tree) to start a build.

Anyways, it is sorta quick and dirty, I didn't want to change the codebase
too much, so I tried to modfiy as little as possible.

Take care,

--jason