Element pluginElement = doc.getDocumentElement();
String pluginName = pluginElement.getAttribute("name");
String pluginVersion = pluginElement.getAttribute("version");</BUG>
if(StringUtils.isBlank(pluginName)) throw new GrailsConfigurationException("Plug-in descriptor ["+pluginDescriptor+"] doesn't specify a plug-in name. It must be corrupted, try re-install the plug-in");
<BUG>if(StringUtils.isBlank(pluginVersion)) throw new GrailsConfigurationException("Plug-in descriptor ["+pluginDescriptor+"] with name ["+pluginName+"] doesn't specify a plug-in version. It must be corrupted, try re-install the plug-in");
XPath xpath = XPathFactory.newInstance().newXPath();
NodeList nodes = (NodeList) xpath.evaluate(
"/plugin/resources/resource",
doc,
XPathConstants.NODESET);</BUG>
List pluginResources = new ArrayList();

private void configureMetaManager(Resource[] pluginDescriptors) {
for (int i = 0; i < pluginDescriptors.length; i++) {
Resource pluginDescriptor = pluginDescriptors[i];
InputStream inputStream = null;
try {
inputStream = pluginDescriptor.getInputStream();
GPathResult pluginElement = new XmlSlurper().parse(inputStream);
String pluginName = ((GPathResult)(pluginElement.getProperty("@name"))).text();
String pluginVersion = ((GPathResult)(pluginElement.getProperty("@version"))).text();
if(StringUtils.isBlank(pluginName)) throw new GrailsConfigurationException("Plug-in descriptor ["+pluginDescriptor+"] doesn't specify a plug-in name. It must be corrupted, try re-install the plug-in");
if(StringUtils.isBlank(pluginVersion)) throw new GrailsConfigurationException("Plug-in descriptor ["+pluginDescriptor+"] with name ["+pluginName+"] doesn't specify a plug-in version. It must be corrupted, try re-install the plug-in");
GPathResult resources = (GPathResult) pluginElement.getProperty("resources");
GPathResult nodes = (GPathResult) resources.getProperty("resource");
