in src/main/java/org/apache/easyant/core/EasyAntEngine.java [350:416]
public void configureEasyAnt(Project project) {
project.setCoreLoader(configuration.getCoreLoader());
addBuildListeners(project);
addInputHandler(project);
// set the thread priorities
if (configuration.getThreadPriority() != null) {
try {
project.log("Setting Ant's thread priority to " + configuration.getThreadPriority(),
Project.MSG_VERBOSE);
Thread.currentThread().setPriority(configuration.getThreadPriority());
} catch (SecurityException swallowed) {
// we cannot set the priority here.
project.log("A security manager refused to set the -nice value");
}
}
project.setKeepGoingMode(configuration.isKeepGoingMode());
if (configuration.isProxy()) {
// proxy setup if enabledcoreLoader
ProxySetup proxySetup = new ProxySetup(project);
proxySetup.enableProxies();
}
project.setName("EasyAnt");
try {
project.init();
project.addReference(EasyAntMagicNames.EASYANT_ENGINE_REF, this);
// set user-define properties
Enumeration<?> properties = configuration.getDefinedProps().propertyNames();
while (properties.hasMoreElements()) {
String arg = (String) properties.nextElement();
String value = (String) configuration.getDefinedProps().get(arg);
project.setUserProperty(arg, value);
}
project.setUserProperty(EasyAntMagicNames.EASYANT_OFFLINE, Boolean.toString(configuration.isOffline()));
ProjectUtils.configureProjectHelper(project);
IvyAntSettings easyantIvySettings = configureEasyAntIvyInstance(project);
configurePluginService(project, easyantIvySettings);
// Profile
if (!configuration.getActiveBuildConfigurations().isEmpty()) {
String buildConfigurations = null;
for (String conf : configuration.getActiveBuildConfigurations()) {
if (buildConfigurations == null) {
buildConfigurations = conf;
} else {
buildConfigurations = buildConfigurations + "," + conf;
}
}
project.log("Active build configurations : " + buildConfigurations, Project.MSG_INFO);
project.setProperty(EasyAntMagicNames.ACTIVE_BUILD_CONFIGURATIONS, buildConfigurations);
}
loadSystemPlugins(project, true);
} catch (RuntimeException exc) {
fireBuildFinished(project, exc);
throw exc;
}
}