提交 be76d093 编写于 作者: J Jesse Glick

If during hudson-dev:run we have updated a bundled plugin, honor that pin at next start.

上级 cd8c8e00
...@@ -10,6 +10,7 @@ import java.util.Collection; ...@@ -10,6 +10,7 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Iterator;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
...@@ -49,6 +50,15 @@ public class InitStrategy { ...@@ -49,6 +50,15 @@ public class InitStrategy {
// for example, while doing "mvn jpi:run" or "mvn hpi:run" on a plugin that's bundled with Jenkins, we want to the // for example, while doing "mvn jpi:run" or "mvn hpi:run" on a plugin that's bundled with Jenkins, we want to the
// *.jpl file to override the bundled jpi/hpi file. // *.jpl file to override the bundled jpi/hpi file.
getBundledPluginsFromProperty(r); getBundledPluginsFromProperty(r);
Iterator<File> it = r.iterator();
while (it.hasNext()) {
File f = it.next();
if (new File(pm.rootDir, f.getName().replace(".hpi", ".jpi") + ".pinned").isFile()) {
// Cf. PluginManager.copyBundledPlugin, which is not called in this case.
LOGGER.log(Level.INFO, "ignoring {0} since this plugin is pinned", f);
it.remove();
}
}
// similarly, we prefer *.jpi over *.hpi // similarly, we prefer *.jpi over *.hpi
listPluginFiles(pm, ".jpl", r); // linked plugin. for debugging. listPluginFiles(pm, ".jpl", r); // linked plugin. for debugging.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册