public static ServerPlugin getPlugin(URL pluginUrl, ServerPluginDescriptorType pluginDescriptor) {
try {
Configuration pluginConfig = null;
Configuration scheduledJobsConfig = null;
ConfigurationDefinition configDef;
configDef = ServerPluginDescriptorMetadataParser.getPluginConfigurationDefinition(pluginDescriptor);
if (configDef != null) {
pluginConfig = configDef.getDefaultTemplate().createConfiguration();
}
configDef = ServerPluginDescriptorMetadataParser.getScheduledJobsDefinition(pluginDescriptor);
if (configDef != null) {
scheduledJobsConfig = configDef.getDefaultTemplate().createConfiguration();
}
File pluginFile = new File(pluginUrl.toURI());
PluginKey pluginKey = PluginKey.createServerPluginKey(new ServerPluginType(pluginDescriptor).stringify(), pluginDescriptor.getName());
ServerPlugin plugin =