diff --git a/test/src/main/java/org/jvnet/hudson/test/TestPluginManager.java b/test/src/main/java/org/jvnet/hudson/test/TestPluginManager.java index eae934678c..330205ec35 100644 --- a/test/src/main/java/org/jvnet/hudson/test/TestPluginManager.java +++ b/test/src/main/java/org/jvnet/hudson/test/TestPluginManager.java @@ -31,6 +31,7 @@ import hudson.Util; import java.io.File; import java.io.IOException; +import java.net.URL; import java.util.Collection; import java.util.HashSet; import java.util.Set; @@ -71,6 +72,14 @@ public class TestPluginManager extends PluginManager { LOGGER.log(Level.SEVERE, "Failed to extract the bundled plugin "+child,e); } } + // If running tests for a plugin, include the plugin being tested + URL u = getClass().getClassLoader().getResource("the.hpl"); + if (u!=null) try { + names.add("the.hpl"); + copyBundledPlugin(u, "the.hpl"); + } catch (IOException e) { + LOGGER.log(Level.SEVERE, "Failed to copy the.hpl",e); + } return names; }