mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 12:05:19 +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
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableSet;
|
||||
import hudson.PluginManager.PluginInstanceStore;
|
||||
import hudson.model.Api;
|
||||
import hudson.model.ModelObject;
|
||||
import jenkins.MissingDependencyException;
|
||||
import jenkins.YesNoMaybe;
|
||||
import jenkins.model.Jenkins;
|
||||
import hudson.model.UpdateCenter;
|
||||
@@ -513,14 +514,14 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
|
||||
* thrown if one or several mandatory dependencies doesn't exists.
|
||||
*/
|
||||
/*package*/ void resolvePluginDependencies() throws IOException {
|
||||
List<String> missingDependencies = new ArrayList<String>();
|
||||
List<Dependency> missingDependencies = new ArrayList<>();
|
||||
// make sure dependencies exist
|
||||
for (Dependency d : dependencies) {
|
||||
if (parent.getPlugin(d.shortName) == null)
|
||||
missingDependencies.add(d.toString());
|
||||
missingDependencies.add(d);
|
||||
}
|
||||
if (!missingDependencies.isEmpty())
|
||||
throw new IOException("Dependency "+Util.join(missingDependencies, ", ")+" doesn't exist");
|
||||
throw new MissingDependencyException(this.shortName, missingDependencies);
|
||||
|
||||
// add the optional dependencies that exists
|
||||
for (Dependency d : optionalDependencies) {
|
||||
|
||||
Reference in new issue
Block a user