提交 22431cde 编写于 作者: K kohsuke

adding a hook for plugins to programmatically define extension points and do...

adding a hook for plugins to programmatically define extension points and do other preparation work before we start loading jobs.



git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36038 71c3de6d-444a-0410-be80-ed276b4c234a
上级 86e187dd
......@@ -69,6 +69,12 @@ public enum InitMilestone implements Milestone {
*/
PLUGINS_STARTED("Started all plugins"),
/**
* By this milestone, all programmatically constructed extension point implementations
* should be added.
*/
EXTENSIONS_AUGMENTED("Augmented all extensions"),
/**
* By this milestone, all jobs and their build records are loaded from disk.
*/
......
......@@ -57,8 +57,6 @@ import hudson.cli.CliEntryPoint;
import hudson.cli.CliManagerImpl;
import hudson.cli.declarative.CLIMethod;
import hudson.cli.declarative.CLIResolver;
import static hudson.init.InitMilestone.JOB_LOADED;
import static hudson.init.InitMilestone.PLUGINS_STARTED;
import hudson.init.InitMilestone;
import hudson.init.InitReactorListener;
import hudson.init.InitStrategy;
......@@ -179,6 +177,8 @@ import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import static hudson.init.InitMilestone.*;
import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
import java.io.File;
......@@ -2164,7 +2164,7 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
});
TaskGraphBuilder g = new TaskGraphBuilder();
Handle loadHudson = g.requires(PLUGINS_STARTED).attains(JOB_LOADED).add("Loading global config", new Executable() {
Handle loadHudson = g.requires(JOB_LOAD_PREPARED).attains(JOB_LOADED).add("Loading global config", new Executable() {
public void run(Reactor session) throws Exception {
XmlFile cfg = getConfigFile();
if (cfg.exists()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册