File tree Expand file tree Collapse file tree 5 files changed +80
-5
lines changed Expand file tree Collapse file tree 5 files changed +80
-5
lines changed Original file line number Diff line number Diff line change 175
175
</dependency >
176
176
<dependency >
177
177
<!-- used in JTH and jenkins core > 2.x -->
178
- <groupId >javax .servlet</groupId >
179
- <artifactId >javax .servlet-api</artifactId >
180
- <version >3.1.0 </version >
178
+ <groupId >jakarta .servlet</groupId >
179
+ <artifactId >jakarta .servlet-api</artifactId >
180
+ <version >4.0.4 </version >
181
181
</dependency >
182
182
<dependency >
183
183
<groupId >junit</groupId >
243
243
244
244
<!-- dependencies provided by virtue of running in Jenkins -->
245
245
<dependency >
246
- <groupId >javax .servlet</groupId >
247
- <artifactId >javax .servlet-api</artifactId >
246
+ <groupId >jakarta .servlet</groupId >
247
+ <artifactId >jakarta .servlet-api</artifactId >
248
248
<scope >provided</scope >
249
249
</dependency >
250
250
556
556
</enforceBytecodeVersion >
557
557
<bannedDependencies >
558
558
<excludes >
559
+ <exclude >javax.servlet:javax.servlet-api</exclude >
559
560
<exclude >javax.servlet:servlet-api</exclude >
560
561
<exclude >org.sonatype.sisu:sisu-guice</exclude >
561
562
<exclude >log4j:log4j:*:jar:compile</exclude >
Original file line number Diff line number Diff line change
1
+ # install, not verify, because we want to check the artifact as we would be about to deploy it
2
+ # release.skipTests normally set in jenkins-release profile since release:perform would do the tests
3
+ invoker.goals =-Dstyle.color=always -ntp -Pjenkins-release -Drelease.skipTests=false clean install
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
3
+ <modelVersion >4.0.0</modelVersion >
4
+ <parent >
5
+ <groupId >org.jenkins-ci.plugins</groupId >
6
+ <artifactId >plugin</artifactId >
7
+ <version >@project.version@</version >
8
+ <relativePath />
9
+ </parent >
10
+ <groupId >org.jenkins-ci.plugins.its</groupId >
11
+ <artifactId >servlet-api</artifactId >
12
+ <version >1.0-SNAPSHOT</version >
13
+ <packaging >hpi</packaging >
14
+ <properties >
15
+ <jenkins .version>2.361.4</jenkins .version>
16
+ </properties >
17
+ <dependencies >
18
+ <dependency >
19
+ <groupId >org.jenkins-ci.plugins</groupId >
20
+ <artifactId >structs</artifactId >
21
+ <version >1.5</version >
22
+ </dependency >
23
+ </dependencies >
24
+ <repositories >
25
+ <repository >
26
+ <id >repo.jenkins-ci.org</id >
27
+ <url >https://repo.jenkins-ci.org/public/</url >
28
+ </repository >
29
+ </repositories >
30
+ <pluginRepositories >
31
+ <pluginRepository >
32
+ <id >repo.jenkins-ci.org</id >
33
+ <url >https://repo.jenkins-ci.org/public/</url >
34
+ </pluginRepository >
35
+ </pluginRepositories >
36
+ </project >
Original file line number Diff line number Diff line change
1
+ <?jelly escape-by-default =' true' ?>
2
+ <div />
Original file line number Diff line number Diff line change
1
+ package test ;
2
+
3
+ import hudson .security .LegacySecurityRealm ;
4
+ import jenkins .model .Jenkins ;
5
+ import org .junit .Rule ;
6
+ import org .junit .Test ;
7
+ import org .jvnet .hudson .test .JenkinsRule ;
8
+
9
+ public class ServletAPITest {
10
+
11
+ @ Rule
12
+ public final JenkinsRule rule = new JenkinsRule ();
13
+
14
+ /**
15
+ * When having both Servlet APIs 3.1 and 4.0 in classpath, the following error
16
+ * is logged on server side:
17
+ *
18
+ * <pre>
19
+ * WARNING o.e.jetty.server.HttpChannel#handleException: /jenkins/j_security_check
20
+ * java.lang.AbstractMethodError: Receiver class org.eclipse.jetty.security.authentication.SessionAuthentication does not define or inherit an
21
+ * implementation of the resolved method 'abstract void valueBound(javax.servlet.http.HttpSessionBindingEvent)' of interface
22
+ * javax.servlet.http.HttpSessionBindingListener. at org.eclipse.jetty.server.session.Session.bindValue(Session.java:357)
23
+ * </pre>
24
+ *
25
+ * And then on client side getting "500 Server Error for
26
+ * http://localhost:.../jenkins/j_security_check"
27
+ */
28
+ @ Test
29
+ public void involveHttpSessionBindingListener () throws Exception {
30
+ Jenkins .get ().setSecurityRealm (new LegacySecurityRealm ());
31
+ rule .createWebClient ().login ("bob" );
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments