mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 23:55:52 +00:00
[HUDSON-1966] Stapler JSON binding needs to use uberClassLoader so that it can create instances from plugins.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10585 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
c3c57c798d
commit
4d5c1cdde4
2 files changed
+5
-1
No files matched your search
@@ -26,6 +26,7 @@ import org.apache.commons.fileupload.FileItem;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
|
||||
/**
|
||||
* Manages {@link PluginWrapper}s.
|
||||
@@ -70,6 +71,9 @@ public final class PluginManager extends AbstractModelObject {
|
||||
|
||||
public PluginManager(ServletContext context) {
|
||||
this.context = context;
|
||||
// JSON binding needs to be able to see all the classes from all the plugins
|
||||
Stapler.setClassLoader(context,uberClassLoader);
|
||||
|
||||
rootDir = new File(Hudson.getInstance().getRootDir(),"plugins");
|
||||
if(!rootDir.exists())
|
||||
rootDir.mkdirs();
|
||||
|
||||
Reference in new issue
Block a user