try {
Project project = Workspace.getProject(basedir);
project.setProperty("in.ant", "true");
project.setProperty("environment", "ant");
project.setExceptions(true);
project.action(command);
if ( report(project) )
throw new BuildException("Command " + command + " failed");
} catch (Throwable e) {
if ( exceptions)