for (Resource resource : resources) {
InputStream input = null;
try {
input = resource.getInputStream();
final GPathResult result = slurper.parse(input);
GPathResult pluginClass = (GPathResult) result.getProperty("type");
if (pluginClass.size() == 1) {
final String pluginClassName = pluginClass.text();
if (StringUtils.hasText(pluginClassName)) {
loadCorePlugin(pluginClassName, resource, result);
}
} else {
final Iterator iterator = pluginClass.nodeIterator();
while (iterator.hasNext()) {
Node node = (Node) iterator.next();
final String pluginClassName = node.text();
if (StringUtils.hasText(pluginClassName)) {
loadCorePlugin(pluginClassName, resource, result);