[JENKINS-55582] Refinement to at least handle nonstandard $JENKINS_HOME/plugins/$shortName.hpi and warn about $shortName-$version.hpi.

This commit is contained in:
Jesse Glick committed 2019-05-23 13:26:15 -04:00
1 parent 1f290ff1d0
commit 3bcdefcae4
6 files changed
+19 -1

No files matched your search

@@ -186,6 +186,10 @@ public class ClassicPluginStrategy implements PluginStrategy {
} catch (InvalidPathException e) {
throw new IOException(e);
}
String canonicalName = manifest.getMainAttributes().getValue("Short-Name") + ".jpi";
if (!archive.getName().equals(canonicalName)) {
LOGGER.warning(() -> "encountered " + archive + " under a nonstandard name; expected " + canonicalName);
}
}
final Attributes atts = manifest.getMainAttributes();