This method is called after {@link #setServletContext(ServletContext)} is invoked.You can also use {@link jenkins.model.Jenkins#getInstance()} to access the singleton hudson instance,although the plugin start up happens relatively early in the initialization stage and not all the data are loaded in Hudson.
If a plugin wants to run an initialization step after all plugins and extension points are registered, a good place to do that is {@link #postInitialize()}. If a plugin wants to run an initialization step after all the jobs are loaded, {@link ItemListener#onLoaded()} is a good place. @throws Exception any exception thrown by the plugin during the initialization will disable plugin. @since 1.42 @see ExtensionPoint @see #postInitialize()
|
|