[FIXED JENKINS-24046]

Warn users if the pinning is preventing Jenkins from overwriting older versions with bundled versions.
This commit is contained in:
Kohsuke Kawaguchi committed 2014-10-16 18:18:25 -07:00
1 parent 65e2a757f9
commit 19f9b63d74
6 files changed
+138 -17

No files matched your search

@@ -72,6 +72,8 @@ import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
import static org.apache.commons.io.FilenameUtils.getBaseName;
public class ClassicPluginStrategy implements PluginStrategy {
private final ClassLoaderReflectionToolkit clt = new ClassLoaderReflectionToolkit();
@@ -125,11 +127,11 @@ public class ClassicPluginStrategy implements PluginStrategy {
if (archive.isDirectory()) {// already expanded
expandDir = archive;
} else {
expandDir = new File(archive.getParentFile(), PluginWrapper.getBaseName(archive));
expandDir = new File(archive.getParentFile(), getBaseName(archive.getName()));
explode(archive, expandDir);
}
File manifestFile = new File(expandDir, "META-INF/MANIFEST.MF");
File manifestFile = new File(expandDir, PluginWrapper.MANIFEST_FILENAME);
if (!manifestFile.exists()) {
throw new IOException(
"Plugin installation failed. No manifest at "