project.setUserProperty("ant.file" , new File(dir, "build.xml").getAbsolutePath());
ProjectHelper.configureProject(project, new File(dir, "build.xml"));
project.setBaseDir(dir);
// Configure logging verbosity
BuildLogger logger = new DefaultLogger();
logger.setMessageOutputLevel(this.verbose ? Project.MSG_VERBOSE
: this.quiet ? Project.MSG_WARN : Project.MSG_INFO);
logger.setOutputPrintStream(System.out);
logger.setErrorPrintStream(System.err);
project.addBuildListener(logger);
// Set properties
project.setUserProperty("ivy.packager.organisation",
"" + this.mr.getModuleId().getOrganisation());