if (plugins == null || plugins.isEmpty()) {
return;
}
for (String pluginName : plugins) {
HeadlessBuildPlugin plugin = null;
synchronized (this.plugins) {
plugin = this.plugins.get(pluginName);
}
if (plugin == null) {
continue;
}
try {
plugin.setup(cnf, projectDir, add, enabledIgnorePlugins);
} catch (Throwable e) {
logger.logError(String.format("Unable to %s headless build file(s) for the %sproject in %s", add ? "add" : "remove", cnf ? "cnf " : "", projectDir.getAbsolutePath()), e);
}
}
}