mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
Merge remote-tracking branch 'origin/master'
Conflicts: changelog.html
This commit is contained in:
commit
86b72241a7
56 files changed
+875
-114
No files matched your search
@@ -377,6 +377,36 @@ public class ClassicPluginStrategy implements PluginStrategy {
|
||||
plugin.getPlugin().start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDependency(PluginWrapper depender, PluginWrapper dependee) {
|
||||
DependencyClassLoader classLoader = findAncestorDependencyClassLoader(depender.classLoader);
|
||||
if (classLoader != null) {
|
||||
classLoader.updateTransientDependencies();
|
||||
LOGGER.log(Level.INFO, "Updated dependency of {0}", depender.getShortName());
|
||||
}
|
||||
}
|
||||
|
||||
private DependencyClassLoader findAncestorDependencyClassLoader(ClassLoader classLoader)
|
||||
{
|
||||
for (; classLoader != null; classLoader = classLoader.getParent()) {
|
||||
if (classLoader instanceof DependencyClassLoader) {
|
||||
return (DependencyClassLoader)classLoader;
|
||||
}
|
||||
|
||||
if (classLoader instanceof AntClassLoader) {
|
||||
// AntClassLoaders hold parents not only as AntClassLoader#getParent()
|
||||
// but also as AntClassLoader#getConfiguredParent()
|
||||
DependencyClassLoader ret = findAncestorDependencyClassLoader(
|
||||
((AntClassLoader)classLoader).getConfiguredParent()
|
||||
);
|
||||
if (ret != null) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static File resolve(File base, String relative) {
|
||||
File rel = new File(relative);
|
||||
if(rel.isAbsolute())
|
||||
@@ -523,6 +553,11 @@ public class ClassicPluginStrategy implements PluginStrategy {
|
||||
this.dependencies = dependencies;
|
||||
}
|
||||
|
||||
private void updateTransientDependencies() {
|
||||
// This will be recalculated at the next time.
|
||||
transientDependencies = null;
|
||||
}
|
||||
|
||||
private List<PluginWrapper> getTransitiveDependencies() {
|
||||
if (transientDependencies==null) {
|
||||
CyclicGraphDetector<PluginWrapper> cgd = new CyclicGraphDetector<PluginWrapper>() {
|
||||
|
||||
Reference in new issue
Block a user