try {
URL pluginDescriptorUrl = file.toURI().toURL();
if (pluginDescriptorUrl == null)
throw new IllegalPluginException("missing plugin descriptor at '"+getName()+"'");
PluginDescriptor pluginDescriptor = new PluginDescriptor(pluginDescriptorUrl.openStream());
return pluginDescriptor;
} catch (FileNotFoundException fnfe) {
log.debug("directory '"+pluginRootDirectory.getAbsolutePath()+"' does not contain a plugin descriptor");
} catch (Exception e) {
e.printStackTrace();
throw new IllegalPluginException("accessing the plugin descriptor failed", e);
}
return null;
}