diff --git a/pom.xml b/pom.xml index 490ab7964..883803042 100644 --- a/pom.xml +++ b/pom.xml @@ -83,8 +83,8 @@ THE SOFTWARE. org.jenkins-ci.main jenkins-war - - 2.138.4 + + 1.651.2 executable-war diff --git a/src/main/java/org/jvnet/hudson/test/PluginAutomaticTestBuilder.java b/src/main/java/org/jvnet/hudson/test/PluginAutomaticTestBuilder.java index 9a72f19b2..68532310f 100644 --- a/src/main/java/org/jvnet/hudson/test/PluginAutomaticTestBuilder.java +++ b/src/main/java/org/jvnet/hudson/test/PluginAutomaticTestBuilder.java @@ -171,7 +171,7 @@ private Method findIsRoutableMethod() throws NoSuchMethodException { private PluginWrapper determineCurrentPlugin() { String plugin = (String) params.get("artifactId"); if (plugin != null) { - return Jenkins.get().pluginManager.getPlugin(plugin); + return Jenkins.getActiveInstance().pluginManager.getPlugin(plugin); } return null; } diff --git a/src/test/java/org/jvnet/hudson/test/JenkinsRuleTest.java b/src/test/java/org/jvnet/hudson/test/JenkinsRuleTest.java index 041dc41b8..e2d4846a5 100644 --- a/src/test/java/org/jvnet/hudson/test/JenkinsRuleTest.java +++ b/src/test/java/org/jvnet/hudson/test/JenkinsRuleTest.java @@ -4,7 +4,6 @@ import com.gargoylesoftware.htmlunit.WebRequest; import hudson.model.User; import jenkins.security.ApiTokenProperty; -import jenkins.security.apitoken.ApiTokenPropertyConfiguration; import net.sf.json.JSONObject; import org.junit.Rule; import org.junit.Test; @@ -82,7 +81,7 @@ public void assertEqualDataBoundBeansWithSettersFailForField() throws Exception @Test public void testTokenHelperMethods() throws Exception { j.jenkins.setSecurityRealm(j.createDummySecurityRealm()); - ApiTokenPropertyConfiguration.get().setTokenGenerationOnCreationEnabled(true); + // Jenkins 2.129+: ApiTokenPropertyConfiguration.get().setTokenGenerationOnCreationEnabled(true); JenkinsRule.WebClient wc = j.createWebClient();