@SuppressWarnings("rawtypes")
private void loadCorePluginsFromResources(Resource[] resources) throws IOException {
LOG.debug("Attempting to load [" + resources.length + "] core plugins");
try {
XmlSlurper slurper = SpringIOUtils.createXmlSlurper();
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);