ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject [PATCH] <java> task should verify specified dir
Date Wed, 20 Sep 2000 08:10:57 GMT
The <java> task should check to make sure the directory specified in the
dir attribute exists, and do the nice thing if it doesn't, instead of just
letting java throw an io exception on CreateProcess (which doesn't tell
java neophytes such as myself a whole lot about what could be wrong). 
Changing the following lines appears to work (but maybe there's a better
way/place to do it [I've also attached a patch-file I hope is in the right
format to be usable]):
<             return run(cmdl.getCommandline());
>           if (dir != null) {
>             if ( ! dir.isDirectory() ) {
>                 throw new BuildException(dir + " is not a directory.") ;
>             }
>           }
>           return run(cmdl.getCommandline());

Specifying a bogus directory then produces:

Buildfile: build.xml


build.xml:843: D:\dianeh\src\main\foo is not a directory.

Total time: 1 seconds



Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
View raw message