{"record":{"id":"94801017de676c0b","repo":"jenkinsci/jenkins","slug":"cannot-enable-plugin-0-as-it-is-missing-the-depe","errorCode":null,"errorMessage":"Cannot enable plugin {0} as it is missing the dependency {1}","messagePattern":"Cannot enable plugin (.+?) as it is missing the dependency (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/EnablePluginCommand.java","lineNumber":91,"sourceCode":"        PluginWrapper plugin = manager.getPlugin(shortName);\n        if (plugin == null) {\n            throw new IllegalArgumentException(Messages.EnablePluginCommand_NoSuchPlugin(shortName));\n        }\n        if (plugin.isEnabled()) {\n            return false;\n        }\n        stdout.printf(\"Enabling plugin `%s' (%s)%n\", plugin.getShortName(), plugin.getVersion());\n        enableDependencies(manager, plugin);\n        plugin.enable();\n        stdout.printf(\"Plugin `%s' was enabled.%n\", plugin.getShortName());\n        return true;\n    }\n\n    private void enableDependencies(PluginManager manager, PluginWrapper plugin) throws IOException {\n        for (PluginWrapper.Dependency dep : plugin.getDependencies()) {\n            PluginWrapper dependency = manager.getPlugin(dep.shortName);\n            if (dependency == null) {\n                throw new IllegalArgumentException(Messages.EnablePluginCommand_MissingDependencies(plugin.getShortName(), dep));\n            }\n            if (!dependency.isEnabled()) {\n                enableDependencies(manager, dependency);\n                stdout.printf(\"Enabling plugin dependency `%s' (%s) for `%s'%n\", dependency.getShortName(), dependency.getVersion(), plugin.getShortName());\n                dependency.enable();\n            }\n        }\n    }\n\n}\n","sourceCodeStart":73,"sourceCodeEnd":102,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/EnablePluginCommand.java#L73-L102","documentation":"Error \"Cannot enable plugin {0} as it is missing the dependency {1}\" thrown in jenkinsci/jenkins.","triggerScenarios":"Raised when the enable-plugin CLI command targets a plugin whose dependency is missing or disabled, so the plugin cannot be enabled. Install/enable the dependency first.","commonSituations":"See trigger scenarios.","solutions":["Install and enable the missing dependency plugin first, then retry enable-plugin.","Check Manage Jenkins > Plugins to see the dependency state of the plugin.","Restart Jenkins after enabling dependencies if required."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}