Package jenkins.plugins
Class DetachedPluginsUtil
java.lang.Object
jenkins.plugins.DetachedPluginsUtil
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class DetachedPluginsUtil
extends Object
Dedicated class to handle the logic related to so-called detached plugins.
Originally, some features were directly in Jenkins core. Over time, more and more features got extracted in dedicated plugins. Issue is: many plugins had started depending on these features, that now were not in the core anymore. So the chosen design strategy has been that the jenkins.war would embed these plugins, and automatically install them and mark them as optional dependencies. This way, older plugins would keep working without having to be modified.
This code was originally moved from ClassicPluginStrategy.
- Since:
- 2.163
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInformation about plugins that were originally in the core. -
Method Summary
Modifier and TypeMethodDescriptionGet the list of all plugins that have ever beendetachedfrom Jenkins core.getDetachedPlugins(VersionNumber since) Get the list of plugins that have been detached since a specific Jenkins release version.static List<PluginWrapper.Dependency>getImpliedDependencies(String pluginName, String jenkinsVersion) Returns all the plugin dependencies that are implicit based on a particular Jenkins versionstatic booleanisDetachedPlugin(String pluginId) Is the named plugin a plugin that was detached from Jenkins at some point in the past.
-
Method Details
-
getImpliedDependencies
@NonNull public static List<PluginWrapper.Dependency> getImpliedDependencies(String pluginName, String jenkinsVersion) Returns all the plugin dependencies that are implicit based on a particular Jenkins version- Since:
- 2.0
-
getDetachedPlugins
Get the list of all plugins that have ever beendetachedfrom Jenkins core.- Returns:
- A
ListofDetachedPluginsUtil.DetachedPlugins.
-
getDetachedPlugins
@NonNull public static List<DetachedPluginsUtil.DetachedPlugin> getDetachedPlugins(@NonNull VersionNumber since) Get the list of plugins that have been detached since a specific Jenkins release version.- Parameters:
since- The Jenkins version.- Returns:
- A
ListofDetachedPluginsUtil.DetachedPlugins. - See Also:
-
isDetachedPlugin
Is the named plugin a plugin that was detached from Jenkins at some point in the past.- Parameters:
pluginId- The plugin ID.- Returns:
trueif the plugin is a plugin that was detached from Jenkins at some point in the past, otherwisefalse.
-
configLines
- Throws:
IOException
-