diff --git a/pom.xml b/pom.xml
index aa95ac89..fbc5f250 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.jenkins-ci.plugins
plugin
- 4.88
+ 5.7
mercurial
@@ -17,8 +17,8 @@
999999-SNAPSHOT
- 2.452
- ${jenkins.baseline}.4
+ 2.479
+ ${jenkins.baseline}.1
false
jenkinsci/${project.artifactId}-plugin
diff --git a/src/main/java/hudson/plugins/mercurial/MercurialSCM.java b/src/main/java/hudson/plugins/mercurial/MercurialSCM.java
index 2fb63888..857ae668 100755
--- a/src/main/java/hudson/plugins/mercurial/MercurialSCM.java
+++ b/src/main/java/hudson/plugins/mercurial/MercurialSCM.java
@@ -73,7 +73,7 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.QueryParameter;
-import org.kohsuke.stapler.StaplerRequest;
+import org.kohsuke.stapler.StaplerRequest2;
/**
* Mercurial SCM.
@@ -1040,12 +1040,12 @@ public String getHgExe() {
}
@Override
- public SCM newInstance(StaplerRequest req, JSONObject formData) throws FormException {
+ public SCM newInstance(StaplerRequest2 req, JSONObject formData) throws FormException {
return super.newInstance(req, formData);
}
@Override
- public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
+ public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
hgExe = req.getParameter("mercurial.hgExe");
save();
return true;
diff --git a/src/main/java/hudson/plugins/mercurial/MercurialStatus.java b/src/main/java/hudson/plugins/mercurial/MercurialStatus.java
index a3c5d678..7b0c1628 100644
--- a/src/main/java/hudson/plugins/mercurial/MercurialStatus.java
+++ b/src/main/java/hudson/plugins/mercurial/MercurialStatus.java
@@ -16,7 +16,7 @@
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.servlet.ServletException;
+import jakarta.servlet.ServletException;
import jenkins.model.Jenkins;
import jenkins.scm.api.SCMEvent;
import jenkins.scm.api.SCMHeadEvent;
@@ -31,12 +31,12 @@
import org.kohsuke.stapler.HttpResponses;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.Stapler;
-import org.kohsuke.stapler.StaplerRequest;
-import org.kohsuke.stapler.StaplerResponse;
+import org.kohsuke.stapler.StaplerRequest2;
+import org.kohsuke.stapler.StaplerResponse2;
import org.springframework.security.core.Authentication;
-import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
-import static javax.servlet.http.HttpServletResponse.SC_OK;
+import static jakarta.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
+import static jakarta.servlet.http.HttpServletResponse.SC_OK;
/**
* Information screen for the use of Mercurial in Jenkins.
*/
@@ -106,7 +106,7 @@ static boolean looselyMatches(URI notifyUri, String repository) {
public HttpResponse doNotifyCommit(@QueryParameter(required=true) final String url,
@QueryParameter String branch,
@QueryParameter String changesetId) throws ServletException, IOException {
- String origin = SCMEvent.originOf(Stapler.getCurrentRequest());
+ String origin = SCMEvent.originOf(Stapler.getCurrentRequest2());
// run in high privilege to see all the projects anonymous users don't see.
// this is safe because we only initiate polling.
// But we shouldn't disclose the item names to users that is not supposed to see them
@@ -202,7 +202,7 @@ private HttpResponse handleNotifyCommit(String origin, URI url, final Authentica
return new HttpResponse() {
@SuppressWarnings("deprecation")
- public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException {
+ public void generateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object node) throws IOException, ServletException {
rsp.setStatus(SC_OK);
rsp.setContentType("text/plain");
for (Item p : projects) {
diff --git a/src/main/java/hudson/plugins/mercurial/MercurialStatusCrumbExclusion.java b/src/main/java/hudson/plugins/mercurial/MercurialStatusCrumbExclusion.java
index 4bd2dfb7..decb2e14 100644
--- a/src/main/java/hudson/plugins/mercurial/MercurialStatusCrumbExclusion.java
+++ b/src/main/java/hudson/plugins/mercurial/MercurialStatusCrumbExclusion.java
@@ -28,10 +28,10 @@
import hudson.Extension;
import hudson.security.csrf.CrumbExclusion;
import java.io.IOException;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
/**