mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 23:55:52 +00:00
added one more initialization hook.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@17122 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
7a96b96a90
commit
ee2dcbd3a5
2 files changed
+22
-3
No files matched your search
@@ -161,6 +161,14 @@ public final class PluginManager extends AbstractModelObject {
|
||||
|
||||
for (PluginWrapper p : activePlugins.toArray(new PluginWrapper[activePlugins.size()])) {
|
||||
strategy.initializeComponents(p);
|
||||
try {
|
||||
p.getPlugin().postInitialize();
|
||||
} catch (Exception e) {
|
||||
failedPlugins.add(new FailedPlugin(p.getShortName(),e));
|
||||
LOGGER.log(Level.SEVERE, "Failed to post-initialize a plug-in " + p.getShortName(), e);
|
||||
activePlugins.remove(p);
|
||||
plugins.remove(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,9 +448,9 @@ public final class PluginManager extends AbstractModelObject {
|
||||
*/
|
||||
public static final class FailedPlugin {
|
||||
public final String name;
|
||||
public final IOException cause;
|
||||
public final Exception cause;
|
||||
|
||||
public FailedPlugin(String name, IOException cause) {
|
||||
public FailedPlugin(String name, Exception cause) {
|
||||
this.name = name;
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user