in org.apache.easyant4e/src/org/apache/easyant4e/services/EasyantProjectServiceImpl.java [97:144]
public void runBuild(IProject project, String buildTaskName, int logLevel, IProgressMonitor monitor) {
console.show();
console.info("");
console.info(project.getName() + "$ easyant " + buildTaskName+".");
IFile ivyFile = project.getFile("module.ivy");
String ivyFilePath = ivyFile.getLocation().toOSString();
File buildModule = new File(ivyFilePath);
URL easyantIvySettingsUrl = Activator.getDefault().getBundle().getResource(EasyAntConstants.PLUGINS_SETTINGS);
Properties properties = new Properties();
properties.put("basedir",project.getLocation().toOSString());
properties.put("build.compiler", "org.eclipse.jdt.core.JDTCompilerAdapter");
properties.put("easyant.modules.dir", easyantCoreService.getPluginsRepositoryPath());
//junit plugin under eclipse
//if property is true : Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
properties.put("test.run.fork", "false");
EasyAntConfiguration configuration = EasyantConfigurationFactory.getInstance().createDefaultConfiguration();
configuration.setShowMemoryDetails(true);
//configuration.setBuildFile(buildFile); //TODO manage module.ant file
configuration.setBuildModule(buildModule);
configuration.setDefinedProps(properties);
configuration.setMsgOutputLevel(logLevel);
Vector<String> targets = new Vector<String>();
targets.add(buildTaskName);
configuration.setTargets(targets);
configuration.setEasyantIvySettingsUrl(easyantIvySettingsUrl.toString());
PrintStream outStream = getConsoleOutStream();
configuration.setOut(outStream);
PrintStream errStream = getConsoleErrStream();
configuration.setErr(errStream);
//TODO lancer cela dans une WorkspaceModifyOperation
try{
EasyAntEngine.runBuild(configuration);
}catch (Exception be) {
Activator.getEasyAntPlugin().log(IStatus.WARNING, be.getMessage());
}
outStream.close();
errStream.close();
}