Skip to content

Commit

Permalink
[JENKINS-73312] Adapt GitHub API for Jetty 12 (EE 9)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Aug 14, 2024
1 parent f7ef628 commit 6f23ce7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<properties>
<revision>1.321</revision>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.472</jenkins.version>
<!-- TODO JENKINS-73278 https://ci.jenkins.io/job/Core/job/jenkins/job/jakarta/ -->
<jenkins.version>2.473-rc35228.0934d942a_85d</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<no-test-jar>false</no-test-jar>
<!-- TODO JENKINS-73339 until in parent POM -->
Expand Down Expand Up @@ -110,6 +111,12 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<!-- TODO JENKINS-73339 until in parent POM, work around https://github.com/jenkinsci/plugin-pom/issues/936 -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
10 changes: 5 additions & 5 deletions src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import javax.servlet.ServletException;
import jakarta.servlet.ServletException;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.ee8.servlet.ServletContextHandler;
import org.eclipse.jetty.ee9.servlet.ServletContextHandler;
import org.jvnet.hudson.test.ThreadPoolImpl;
import org.kohsuke.stapler.HttpResponse;
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;

public class MockGitHub implements Closeable {
private AtomicLong nextId = new AtomicLong();
Expand Down Expand Up @@ -178,7 +178,7 @@ public List<MockOwner<?>> owners() {
public HttpResponse doRepositories(final @QueryParameter long since) {
return new HttpResponse() {
@Override
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node)
public void generateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object node)
throws IOException, ServletException {
List<MockRepository> repositories = new ArrayList<>();
for (MockOwner<?> o : owners()) {
Expand Down

0 comments on commit 6f23ce7

Please sign in to comment.