mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 23:55:52 +00:00
[FIXED JENKINS-19976] Merged #1054: fix class loading from dynamically installed optional dependencies.
This commit is contained in:
commit
df8df45c27
6 files changed
+195
No files matched your search
@@ -453,6 +453,23 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
} catch (ReactorException e) {
|
||||
throw new IOException("Failed to initialize "+ sn +" plugin",e);
|
||||
}
|
||||
|
||||
// recalculate dependencies of plugins optionally depending the newly deployed one.
|
||||
for (PluginWrapper depender: plugins) {
|
||||
if (depender.equals(p)) {
|
||||
// skip itself.
|
||||
continue;
|
||||
}
|
||||
for (Dependency d: depender.getOptionalDependencies()) {
|
||||
if (d.shortName.equals(p.getShortName())) {
|
||||
// this plugin depends on the newly loaded one!
|
||||
// recalculate dependencies!
|
||||
getPluginStrategy().updateDependency(depender, p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.info("Plugin " + sn + " dynamically installed");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user