mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 10:36:21 +00:00
JENKINS-33308 - automatically install previously bundled dependencies
for plugins that depend on old Jenkins versions
This commit is contained in:
1 parent
3edb9fdcec
commit
5e8bb98ee0
2 files changed
+30
-1
No files matched your search
@@ -259,6 +259,19 @@ public class ClassicPluginStrategy implements PluginStrategy {
|
||||
return new PluginWrapper(pluginManager, archive, manifest, baseResourceURL,
|
||||
createClassLoader(paths, dependencyLoader, atts), disableFile, dependencies, optionalDependencies);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the bundled plugin dependencies for a particular Jenkins version
|
||||
*/
|
||||
public static List<PluginWrapper.Dependency> getPreviouslyBundledDependencies(String jenkinsVersion) {
|
||||
List<PluginWrapper.Dependency> out = new ArrayList<>();
|
||||
for (DetachedPlugin detached : DETACHED_LIST) {
|
||||
if (jenkinsVersion == null || jenkinsVersion.equals("null") || new VersionNumber(jenkinsVersion).compareTo(detached.splitWhen) <= 0) {
|
||||
out.add(new PluginWrapper.Dependency(detached.shortName + ':' + detached.requireVersion));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
protected ClassLoader createClassLoader(List<File> paths, ClassLoader parent) throws IOException {
|
||||
|
||||
Reference in new issue
Block a user