mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 07:35:53 +00:00
[JENKINS-34683] Do not print stack trace if plugin is missing dependencies (#2048)
[JENKINS-34683] - Do not print stack trace if plugin is missing dependencies
This commit is contained in:
1 parent
f4765d9aec
commit
3e1bc969f4
4 files changed
+76
-3
No files matched your search
@@ -48,6 +48,7 @@ import hudson.util.VersionNumber;
|
||||
import hudson.util.XStream2;
|
||||
import jenkins.ClassLoaderReflectionToolkit;
|
||||
import jenkins.InitReactorRunner;
|
||||
import jenkins.MissingDependencyException;
|
||||
import jenkins.RestartRequiredException;
|
||||
import jenkins.YesNoMaybe;
|
||||
import jenkins.install.InstallState;
|
||||
@@ -413,6 +414,12 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
try {
|
||||
p.resolvePluginDependencies();
|
||||
strategy.load(p);
|
||||
} catch (MissingDependencyException e) {
|
||||
failedPlugins.add(new FailedPlugin(p.getShortName(), e));
|
||||
activePlugins.remove(p);
|
||||
plugins.remove(p);
|
||||
LOGGER.log(Level.SEVERE, "Failed to install {0}: {1}", new Object[] { p.getShortName(), e.getMessage() });
|
||||
return;
|
||||
} catch (IOException e) {
|
||||
failedPlugins.add(new FailedPlugin(p.getShortName(), e));
|
||||
activePlugins.remove(p);
|
||||
|
||||
Reference in new issue
Block a user