mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
implemented optional dependencies
Plugin authors could now define optional dependencies to other plugins in their pom. Extensions which are using classes from optional dependencies must specify this with the "requires" attribute of the extension annotation. Extensions with "requires" attribute are not installed if one of the specified plugins, is not installed.
This commit is contained in:
@@ -99,7 +99,7 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
|
||||
modules = getInstalled(parent, context, PATH_MODULECONFIG);
|
||||
|
||||
collector = new ExtensionCollector(Iterables.concat(modules, unwrap()));
|
||||
collector = new ExtensionCollector(parent, modules, installedPlugins);
|
||||
extensionProcessor = new DefaultExtensionProcessor(collector);
|
||||
}
|
||||
catch (IOException | JAXBException ex)
|
||||
@@ -170,19 +170,6 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
return uberWebResourceLoader;
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Iterable<InstalledPluginDescriptor> unwrap()
|
||||
{
|
||||
return PluginsInternal.unwrap(installedPlugins);
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user