if (!logDirectory.exists()) {
logDirectory.mkdirs();
}
project.setUserProperty("XmlLogger.file", logFile.getAbsolutePath());
XmlLogger logger = new XmlLogger();
project.addBuildListener(logger);
project.fireBuildStarted();
project.init();
project.setBaseDir(publicationDirectory);