}
}
else
{
// Clean up stuff previously put in the temporary directory
Delete delete = (Delete) createAntTask("delete");
FileSet fileSet = new FileSet();
fileSet.setDir(tmpDir);
fileSet.createInclude().setName("**/*");
delete.addFileset(fileSet);
delete.setIncludeEmptyDirs(true);
delete.execute();
}
// make sure we're returning a directory
if (!tmpDir.isDirectory())
{
throw new BuildException(tmpDir + " is not a directory");