Skip to content

Commit ee53eb6

Browse files
committed
Update for Jakarta EE
1 parent 7c274e6 commit ee53eb6

File tree

16 files changed

+62
-58
lines changed

16 files changed

+62
-58
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.evolvedbinary.thirdparty.org.apache.xmlrpc/xmlrpc/badge.svg)](https://search.maven.org/search?q=g:com.evolvedbinary.thirdparty.org.apache.xmlrpc)
66

77
[Apache XML-RPC](https://ws.apache.org/xmlrpc/) is no longer officially maintained by Apache.
8-
This is a simple fork for the purposes of applying the latest security patches.
8+
This is a simple fork for the purposes of:
9+
1. Applying the latest security patches.
10+
2. Providing support for Jakarta EE 5+, i.e.: `jakarta.javax`
911

1012
* The Apache XML-RPC source code was imported to Git from the archived SVN Apache XML-RPC repository at: https://svn.apache.org/repos/asf/webservices/archive/xmlrpc/
1113
* The security patches were obtained from the Fedora project's package at: https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/34/Everything/source/tree/Packages/x/xmlrpc-3.1.3-28.fc34.src.rpm
1214
* Whilst 6 patches are available, the 2nd patch for OSGI metadata has not been applied as `PR: XMLRPC-184` (see commit: f0b8977) exists in the main line of this code base and already adds some conflicting OSGI metadata support.
1315

1416
*NOTE*: This fork was created for our own purposes, and we offer no guarantee that we will maintain it beyond our own requirements.
1517

18+
*NOTE*: The version 4.x.x line contains only the original source code plus the security updates, whereas the 5.x.x line also contains changes to switch from the `javax.servlet` package namespace to Jakarta EE's `jakarta.servlet` package namespace.
19+
1620
However, if you want a possibly more secure Apache XML-RPC than the last official version (3.1.3), then this fork's artifacts are available
1721
from Maven Central as:
1822

@@ -21,7 +25,7 @@ from Maven Central as:
2125
<dependency>
2226
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
2327
<artifactId>xmlrpc-server</artifactId>
24-
<version>4.0.0</version>
28+
<version>5.0.0</version>
2529
</dependency>
2630
```
2731

@@ -30,7 +34,7 @@ from Maven Central as:
3034
<dependency>
3135
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
3236
<artifactId>xmlrpc-client</artifactId>
33-
<version>4.0.0</version>
37+
<version>5.0.0</version>
3438
</dependency>
3539
```
3640

@@ -39,7 +43,7 @@ from Maven Central as:
3943
<dependency>
4044
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
4145
<artifactId>xmlrpc-common</artifactId>
42-
<version>4.0.0</version>
46+
<version>5.0.0</version>
4347
</dependency>
4448
```
4549

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<dependency>
9494
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
9595
<artifactId>xmlrpc-common</artifactId>
96-
<version>4.0.1-SNAPSHOT</version>
96+
<version>${project.version}</version>
9797
</dependency>
9898
</dependencies>
9999
</project>

dist/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@
6464
</build>
6565
<dependencies>
6666
<dependency>
67-
<groupId>javax.servlet</groupId>
68-
<artifactId>javax.servlet-api</artifactId>
67+
<groupId>jakarta.servlet</groupId>
68+
<artifactId>jakarta.servlet-api</artifactId>
6969
</dependency>
7070
<dependency>
7171
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
7272
<artifactId>xmlrpc-client</artifactId>
73-
<version>4.0.1-SNAPSHOT</version>
73+
<version>${project.version}</version>
7474
</dependency>
7575
<dependency>
7676
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
7777
<artifactId>xmlrpc-server</artifactId>
78-
<version>4.0.1-SNAPSHOT</version>
78+
<version>${project.version}</version>
7979
</dependency>
8080
</dependencies>
8181

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@
391391
</exclusions>
392392
</dependency>
393393
<dependency>
394-
<groupId>javax.servlet</groupId>
395-
<artifactId>javax.servlet-api</artifactId>
396-
<version>3.1.0</version>
394+
<groupId>jakarta.servlet</groupId>
395+
<artifactId>jakarta.servlet-api</artifactId>
396+
<version>5.0.0</version>
397397
<scope>provided</scope>
398398
</dependency>
399399
<dependency>

server/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,17 @@
112112
<dependency>
113113
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
114114
<artifactId>xmlrpc-common</artifactId>
115-
<version>4.0.1-SNAPSHOT</version>
115+
<version>${project.version}</version>
116116
</dependency>
117117
<dependency>
118118
<groupId>com.evolvedbinary.thirdparty.org.apache.xmlrpc</groupId>
119119
<artifactId>xmlrpc-client</artifactId>
120-
<version>4.0.1-SNAPSHOT</version>
120+
<version>${project.version}</version>
121121
<scope>test</scope>
122122
</dependency>
123123
<dependency>
124-
<groupId>javax.servlet</groupId>
125-
<artifactId>javax.servlet-api</artifactId>
124+
<groupId>jakarta.servlet</groupId>
125+
<artifactId>jakarta.servlet-api</artifactId>
126126
</dependency>
127127
</dependencies>
128128
</project>

server/src/main/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,27 @@
4040
import java.util.Map;
4141
import java.util.StringTokenizer;
4242

43-
import javax.servlet.ReadListener;
44-
import javax.servlet.RequestDispatcher;
45-
import javax.servlet.ServletException;
46-
import javax.servlet.ServletInputStream;
47-
import javax.servlet.DispatcherType;
48-
import javax.servlet.AsyncContext;
49-
import javax.servlet.ServletContext;
50-
import javax.servlet.ServletRequest;
51-
import javax.servlet.ServletResponse;
52-
import javax.servlet.http.Cookie;
53-
import javax.servlet.http.HttpUpgradeHandler;
54-
import javax.servlet.http.Part;
55-
import javax.servlet.http.HttpServletRequest;
56-
import javax.servlet.http.HttpServletResponse;
57-
import javax.servlet.http.HttpSession;
43+
import jakarta.servlet.ReadListener;
44+
import jakarta.servlet.RequestDispatcher;
45+
import jakarta.servlet.ServletException;
46+
import jakarta.servlet.ServletInputStream;
47+
import jakarta.servlet.DispatcherType;
48+
import jakarta.servlet.AsyncContext;
49+
import jakarta.servlet.ServletContext;
50+
import jakarta.servlet.ServletRequest;
51+
import jakarta.servlet.ServletResponse;
52+
import jakarta.servlet.http.Cookie;
53+
import jakarta.servlet.http.HttpUpgradeHandler;
54+
import jakarta.servlet.http.Part;
55+
import jakarta.servlet.http.HttpServletRequest;
56+
import jakarta.servlet.http.HttpServletResponse;
57+
import jakarta.servlet.http.HttpSession;
5858

5959
import org.apache.xmlrpc.common.XmlRpcStreamConfig;
6060
import org.apache.xmlrpc.util.HttpUtil;
6161

6262

63-
/** Stub implementation of a {@link javax.servlet.http.HttpServletRequest}
63+
/** Stub implementation of a {@link jakarta.servlet.http.HttpServletRequest}
6464
* with lots of unimplemented methods. I implemented only those, which
6565
* are required for testing the {@link org.apache.xmlrpc.webserver.XmlRpcServlet}.
6666
* Perhaps someone else is adding more at a later time?

server/src/main/java/org/apache/xmlrpc/webserver/HttpServletResponseImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
import java.util.Collections;
3434
import java.util.StringTokenizer;
3535

36-
import javax.servlet.ServletOutputStream;
37-
import javax.servlet.http.Cookie;
38-
import javax.servlet.http.HttpServletResponse;
36+
import jakarta.servlet.ServletOutputStream;
37+
import jakarta.servlet.http.Cookie;
38+
import jakarta.servlet.http.HttpServletResponse;
3939

4040

41-
/** Stub implementation of a {@link javax.servlet.http.HttpServletResponse}
41+
/** Stub implementation of a {@link jakarta.servlet.http.HttpServletResponse}
4242
* with lots of unimplemented methods. I implemented only those, which
4343
* are required for testing the {@link org.apache.xmlrpc.webserver.XmlRpcServlet}.
4444
* Perhaps someone else is adding more at a later time?

server/src/main/java/org/apache/xmlrpc/webserver/ServletConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.io.IOException;
2222
import java.net.Socket;
2323

24-
import javax.servlet.http.HttpServlet;
24+
import jakarta.servlet.http.HttpServlet;
2525

2626
import org.apache.xmlrpc.util.ThreadPool.InterruptableTask;
2727

server/src/main/java/org/apache/xmlrpc/webserver/ServletOutputStreamImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import java.io.IOException;
2222
import java.io.OutputStream;
2323

24-
import javax.servlet.ServletOutputStream;
25-
import javax.servlet.WriteListener;
24+
import jakarta.servlet.ServletOutputStream;
25+
import jakarta.servlet.WriteListener;
2626

2727

2828
/** Default implementation of a servlet output stream.

server/src/main/java/org/apache/xmlrpc/webserver/ServletWebServer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
import java.util.Enumeration;
2525
import java.util.NoSuchElementException;
2626

27-
import javax.servlet.ServletConfig;
28-
import javax.servlet.ServletContext;
29-
import javax.servlet.ServletException;
30-
import javax.servlet.http.HttpServlet;
27+
import jakarta.servlet.ServletConfig;
28+
import jakarta.servlet.ServletContext;
29+
import jakarta.servlet.ServletException;
30+
import jakarta.servlet.http.HttpServlet;
3131

3232
import org.apache.xmlrpc.server.PropertyHandlerMapping;
3333
import org.apache.xmlrpc.server.XmlRpcStreamServer;

0 commit comments

Comments
 (0)