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 Classes Modifier and Type Class Description static class
DetachedPluginsUtil.DetachedPlugin
Information about plugins that were originally in the core.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stream<String>
configLines(InputStream is)
static List<DetachedPluginsUtil.DetachedPlugin>
getDetachedPlugins()
Get the list of all plugins that have ever beendetached
from Jenkins core.static List<DetachedPluginsUtil.DetachedPlugin>
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 boolean
isDetachedPlugin(String pluginId)
Is the named plugin a plugin that was detached from Jenkins at some point in the past.
-
-
-
Method Detail
-
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
@NonNull public static List<DetachedPluginsUtil.DetachedPlugin> getDetachedPlugins()
Get the list of all plugins that have ever beendetached
from Jenkins core.- Returns:
- A
List
ofDetachedPluginsUtil.DetachedPlugin
s.
-
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
List
ofDetachedPluginsUtil.DetachedPlugin
s. - See Also:
getDetachedPlugins()
-
isDetachedPlugin
public static boolean isDetachedPlugin(@NonNull String pluginId)
Is the named plugin a plugin that was detached from Jenkins at some point in the past.- Parameters:
pluginId
- The plugin ID.- Returns:
true
if the plugin is a plugin that was detached from Jenkins at some point in the past, otherwisefalse
.
-
configLines
public static Stream<String> configLines(InputStream is) throws IOException
- Throws:
IOException
-
-