if (! f.exists() || !f.isDirectory())
throw new BuildException("\""+ f.getPath() + "\" does not represent a valid directory. JDepend would fail.");
commandline.createArgument().setValue(f.getPath());
}
Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN), watchdog);
execute.setCommandline(commandline.getCommandline());
if (getDir() != null) {
execute.setWorkingDirectory(getDir());
execute.setAntRun(project);
}
if (getOutputFile() != null)
log("Ouptut to be stored in " + getOutputFile().getPath());
log("Executing: "+commandline.toString(), Project.MSG_VERBOSE);
try {
return execute.execute();
} catch (IOException e) {
throw new BuildException("Process fork failed.", e, location);
}
}