mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 07:35:53 +00:00
[JENKINS-21486] Fix plugin dependencies resolution
* Check that dependencies are enabled. A disabled optional dependency will not prevent a plugin from loading. * Check versions of dependencies declared by a plugin before loading it. If any dependency (even optional) is older than what is required, then the plugin isn't loaded. This should prevent use cases where a plugin is loaded but one of its dependencies is too old so that : * its @Extension annotated classes cannot be loaded, causing the full Jenkins to blow up with crapload of exceptions which are tedious to investigate to understand the root cause. * NoSuchMethodError and the likes at runtime even though boot has completed. Version check (for setups where version list is manually crafted but yet works) can be disabled by starting Jenkins with -Dhudson.PluginWrapper.dependenciesVersionCheck.enabled=true Minor fixes done while implementing this change : * Fix version parsing in PluginWrapper.Dependency * Dynamic plugin load didn't check for disabled flag
This commit is contained in:
1 parent
83f51e0782
commit
d57db1b1f2
8 files changed
+172
-11
No files matched your search
@@ -489,7 +489,8 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
// so existing plugins can't be depending on this newly deployed one.
|
||||
|
||||
plugins.add(p);
|
||||
activePlugins.add(p);
|
||||
if (p.isActive())
|
||||
activePlugins.add(p);
|
||||
synchronized (((UberClassLoader) uberClassLoader).loaded) {
|
||||
((UberClassLoader) uberClassLoader).loaded.clear();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user