jenkinsci/jenkins · error · IllegalArgumentException
JAR lacks a manifest
Error message
JAR lacks a manifest
What it means
Error "JAR lacks a manifest" thrown in jenkinsci/jenkins.
Source
Thrown at core/src/main/java/hudson/cli/InstallPluginCommand.java:180
throw new AbortException("Error occurred, see previous output.");
}
if (restart)
h.safeRestart();
return 0; // all success
}
private static File getTmpFile() throws Exception {
return File.createTempFile("download", ".jpi.tmp", Jenkins.get().getPluginManager().rootDir);
}
private static File moveToFinalLocation(File tmpFile) throws Exception {
String pluginName;
try (JarFile jf = new JarFile(tmpFile)) {
Manifest mf = jf.getManifest();
if (mf == null) {
throw new IllegalArgumentException("JAR lacks a manifest");
}
pluginName = mf.getMainAttributes().getValue("Short-Name");
}
if (pluginName == null) {
throw new IllegalArgumentException("JAR manifest lacks a Short-Name attribute and so does not look like a plugin");
}
File target = new File(Jenkins.get().getPluginManager().rootDir, pluginName + ".jpi");
Files.move(tmpFile.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
return target;
}
}
View on GitHub (pinned to 2e228ff40b)
Solutions
- Verify the file is a valid JAR/HPI plugin archive, not an HTML error page or corrupted download.
- Re-download the plugin from the Jenkins update center or plugins.jenkins.io.
- Inspect the archive with 'jar tf <file>' to confirm it is a well-formed JAR.
When it happens
Trigger: Raised when the install-plugin CLI command is given a local file that is not a valid JAR/HPI (no META-INF/MANIFEST.MF).
Common situations: See trigger scenarios.
AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14).
Data as JSON: /api/errors/cdf799a0edac58a6.
Report an issue: GitHub.