auto-add Subversion support into a dependency list for plugins built before 1.311

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18980 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-06-16 19:18:08 +00:00
1 parent ee5cba8fac
commit d2abcd62e0
1 file changed
+7
@@ -167,6 +167,13 @@ public class ClassicPluginStrategy implements PluginStrategy {
optionalDependencies.add(new PluginWrapper.Dependency("maven-plugin:" + Hudson.VERSION));
}
// subversion support was split off into a plugin in 1.311, so plugins built before that should automatically get
// subversion plugin as a dependency
if (!"subversion".equals(shortName) &&
(hudsonVersion == null || hudsonVersion.equals("null") || hudsonVersion.compareTo("1.310") <= 0)) {
optionalDependencies.add(new PluginWrapper.Dependency("subversion:1.0"));
}
ClassLoader dependencyLoader = new DependencyClassLoader(getClass()
.getClassLoader(), Util.join(dependencies,optionalDependencies));
ClassLoader classLoader = new URLClassLoader(paths.toArray(new URL[paths.size()]),