{"record":{"id":"ec3c1429cf74f94d","repo":"jenkinsci/jenkins","slug":"jar-manifest-lacks-a-short-name-attribute-and-so-d","errorCode":null,"errorMessage":"JAR manifest lacks a Short-Name attribute and so does not look like a plugin","messagePattern":"JAR manifest lacks a Short-Name attribute and so does not look like a plugin","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/InstallPluginCommand.java","lineNumber":185,"sourceCode":"            h.safeRestart();\n        return 0; // all success\n    }\n\n    private static File getTmpFile() throws Exception {\n        return File.createTempFile(\"download\", \".jpi.tmp\", Jenkins.get().getPluginManager().rootDir);\n    }\n\n    private static File moveToFinalLocation(File tmpFile) throws Exception {\n        String pluginName;\n        try (JarFile jf = new JarFile(tmpFile)) {\n            Manifest mf = jf.getManifest();\n            if (mf == null) {\n                throw new IllegalArgumentException(\"JAR lacks a manifest\");\n            }\n            pluginName = mf.getMainAttributes().getValue(\"Short-Name\");\n        }\n        if (pluginName == null) {\n            throw new IllegalArgumentException(\"JAR manifest lacks a Short-Name attribute and so does not look like a plugin\");\n        }\n        File target = new File(Jenkins.get().getPluginManager().rootDir, pluginName + \".jpi\");\n        Files.move(tmpFile.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);\n        return target;\n    }\n}\n","sourceCodeStart":167,"sourceCodeEnd":192,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/InstallPluginCommand.java#L167-L192","documentation":"Error \"JAR manifest lacks a Short-Name attribute and so does not look like a plugin\" thrown in jenkinsci/jenkins.","triggerScenarios":"Raised when the install-plugin CLI command is given a JAR whose manifest lacks the Short-Name attribute, so it is not recognized as a Jenkins plugin.","commonSituations":"See trigger scenarios.","solutions":["The archive is a plain JAR, not a Jenkins plugin; supply a proper .jpi/.hpi plugin file.","Download the plugin from plugins.jenkins.io or the configured update center.","Build the plugin with the Jenkins maven-hpi-plugin so the manifest includes Short-Name."],"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"}