Package org.jvnet.hudson.test
Class UnitTestSupportingPluginManager
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.PluginManager
-
- org.jvnet.hudson.test.UnitTestSupportingPluginManager
-
- All Implemented Interfaces:
hudson.model.ModelObject
,hudson.search.SearchableModelObject
,hudson.search.SearchItem
,jenkins.util.io.OnMaster
,org.kohsuke.stapler.StaplerOverridable
,org.kohsuke.stapler.StaplerProxy
- Direct Known Subclasses:
TestPluginManager
public class UnitTestSupportingPluginManager extends hudson.PluginManager
PluginManager
that can work with unit tests where dependencies are just jars.PluginManager
to speed up unit tests.Instead of loading every plugin for every test case, this allows them to reuse a single plugin manager.
TODO:
Plugin
start/stop/postInitialize invocation semantics gets different. Perhaps- Author:
- Kohsuke Kawaguchi
- See Also:
HudsonTestCase.useLocalPluginManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.PluginManager
hudson.PluginManager.FailedPlugin, hudson.PluginManager.MetadataCache, hudson.PluginManager.PluginCycleDependenciesMonitor, hudson.PluginManager.PluginDeprecationMonitor, hudson.PluginManager.PluginUpdateMonitor, hudson.PluginManager.UberClassLoader
-
-
Constructor Summary
Constructors Constructor Description UnitTestSupportingPluginManager(File rootDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
installDetachedPlugin(String shortName)
Dynamically load a detached plugin that would not otherwise get loaded.protected Collection<String>
loadBundledPlugins()
-
Methods inherited from class hudson.PluginManager
addDependencies, copyBundledPlugin, createCache, createDefault, createPluginStrategy, disablePlugins, discover, doCheckPluginUrl, doCheckUpdatesServer, doInstall, doInstallNecessaryPlugins, doInstallPlugins, doInstallPluginsDone, doPlugins, doPluginsSearch, doPrevalidateConfig, doProxyConfigure, doSiteConfigure, doUpdateSources, doUploadPlugin, dynamicLoad, dynamicLoad, getApi, getBundledPluginManifest, getDisplayName, getFailedPlugins, getLastErrorCheckUpdateCenters, getOverrides, getPlugin, getPlugin, getPlugins, getPlugins, getPluginStrategy, getProxyDescriptor, getSearchUrl, getTarget, getWorkDir, hasAdoptThisPluginLabel, hasAdoptThisPluginLabel, hasLatestVersionNewerThanOffered, identifyPluginShortName, initTasks, install, isMetaLabel, isNonMetaLabel, isPluginUploaded, loadDetachedPlugins, loadPluginsFromWar, loadPluginsFromWar, parseRequestedPlugins, prevalidateConfig, resolveDependentPlugins, start, stop, unscientific, whichPlugin
-
-
-
-
Constructor Detail
-
UnitTestSupportingPluginManager
public UnitTestSupportingPluginManager(File rootDir)
-
-
Method Detail
-
loadBundledPlugins
protected Collection<String> loadBundledPlugins() throws Exception
- Specified by:
loadBundledPlugins
in classhudson.PluginManager
- Throws:
Exception
- See Also:
LocalPluginManager.loadBundledPlugins()
-
installDetachedPlugin
public void installDetachedPlugin(String shortName) throws Exception
Dynamically load a detached plugin that would not otherwise get loaded. Will only work in Jenkins 2.x. May be called at any time after Jenkins starts up (do not use fromloadBundledPlugins()
. You may need to first install any transitive dependencies.- Parameters:
shortName
-cvs
for example- Throws:
Exception
-
-