[JENKINS-33843] Permit disabling optional dependencies (#4001)

* Implied dependencies on detached plugins were not being marked optional despite being listed in optionalDependencies, confusing the calculation of optionalDependents in resolveDependentPlugins.

* Javadoc improvements based on code exploration.

* [JENKINS-33843] Do not consider optional dependencies for purposes of disabling plugins.

* PluginManagerInstalledGUITest updated to reflect new behavior.
This commit is contained in:
Jesse Glick authored and Oleg Nenashev committed 2019-06-15 11:21:20 +02:00
1 parent dcc395b814
commit 0f73231f77
6 files changed
+127 -54

No files matched your search

+6 -3
View File
@@ -1019,15 +1019,18 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
* If the war file has any "/WEB-INF/plugins/[*.jpi | *.hpi]", extract them into the plugin directory.
*
* @return
* File names of the bundled plugins. Like {"ssh-slaves.hpi","subversion.jpi"}
* File names of the bundled plugins. Normally empty (not to be confused with {@link #loadDetachedPlugins}) but OEM WARs may have some.
* @throws Exception
* Any exception will be reported and halt the startup.
*/
protected abstract Collection<String> loadBundledPlugins() throws Exception;
/**
* Copies the bundled plugin from the given URL to the destination of the given file name (like 'abc.jpi'),
* with a reasonable up-to-date check. A convenience method to be used by the {@link #loadBundledPlugins()}.
* Copies the plugin from the given URL to the given destination.
* Despite the name, this is used also from {@link #loadDetachedPlugins}.
* Includes a reasonable up-to-date check.
* A convenience method to be used by {@link #loadBundledPlugins()}.
* @param fileName like {@code abc.jpi}
*/
protected void copyBundledPlugin(URL src, String fileName) throws IOException {
LOGGER.log(FINE, "Copying {0}", src);