mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
If during hudson-dev:run we have updated a bundled plugin, honor that pin at next start.
This commit is contained in:
1 parent
cd8c8e0072
commit
be76d09384
1 file changed
+10
@@ -10,6 +10,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -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
|
||||
// *.jpl file to override the bundled jpi/hpi file.
|
||||
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
|
||||
listPluginFiles(pm, ".jpl", r); // linked plugin. for debugging.
|
||||
|
||||
Reference in new issue
Block a user