You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by so...@apache.org on 2026/09/02 06:25:22 UTC
(wicket) branch WICKET-7199-master created (now adbf5646e6)
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a change to branch WICKET-7199-master
in repository https://gitbox.apache.org/repos/asf/wicket.git
at adbf5646e6 [WICKET-7199] jetty and jackson are updated
This branch includes the following new commits:
new adbf5646e6 [WICKET-7199] jetty and jackson are updated
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(wicket) 01/01: [WICKET-7199] jetty and jackson are updated
Posted by so...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch WICKET-7199-master
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit adbf5646e60aa61e20dfc1a6255494800ea57f28
Author: Maxim Solodovnik <so...@apache.org>
AuthorDate: Wed Sep 2 13:25:03 2026 +0700
[WICKET-7199] jetty and jackson are updated
---
.../src/main/resources/archetype-resources/pom.xml | 33 +++-----
pom.xml | 50 ++++++-----
testing/wicket-js-tests/pom.xml | 4 +-
.../testing/jstest/StartJavaScriptTests.java | 9 +-
testing/wicket-threadtest/pom.xml | 8 +-
.../wicket/protocol/http/WebApplicationTest.java | 2 +-
.../protocol/http/BufferedHttpServletResponse.java | 22 +++--
.../http/mock/MockHttpServletResponse.java | 97 +++++++++++++---------
wicket-examples/pom.xml | 16 ++--
.../wicket/examples/JettyTestCaseDecorator.java | 11 ++-
.../org/apache/wicket/examples/StartExamples.java | 13 +--
wicket-extensions/pom.xml | 10 +--
wicket-extensions/src/main/java/module-info.java | 2 +-
.../requestlogger/JsonRequestLogger.java | 43 +++++-----
wicket-migration/pom.xml | 4 +-
.../wicket-native-websocket-javax/pom.xml | 8 +-
16 files changed, 179 insertions(+), 153 deletions(-)
diff --git a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index 68f96b348e..d77713e6b0 100644
--- a/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -98,33 +98,29 @@
<scope>test</scope>
<version>${jetty.version}</version>
</dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
- <scope>test</scope>
- <version>${jetty.version}</version>
- </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jmx</artifactId>
<scope>test</scope>
<version>${jetty.version}</version>
</dependency>
+ <!--
+ eeXX MUST be aligned with servlet version
+ https://jakarta.ee/specifications/servlet/
+ -->
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-jakarta-server</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-webapp</artifactId>
<scope>test</scope>
<version>${jetty.version}</version>
</dependency>
-
- <!-- uncomment if WebSocket support is needed
+ <!-- comment if WebSocket support is needed -->
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-jakarta-server</artifactId>
- <version>${jetty.version}</version>
+ <groupId>org.eclipse.jetty.ee11.websocket</groupId>
+ <artifactId>jetty-ee11-websocket-jakarta-server</artifactId>
<scope>test</scope>
+ <version>${jetty.version}</version>
</dependency>
- -->
</dependencies>
<build>
<resources>
@@ -179,15 +175,12 @@
<version>@maven-war-plugin.version@</version>
</plugin>
<plugin>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<systemProperties>
- <systemProperty>
- <name>maven.project.build.directory.test-classes</name>
- <value>${project.build.directory}/test-classes</value>
- </systemProperty>
+ <maven.project.build.directory.test-classes>${project.build.directory}/test-classes</maven.project.build.directory.test-classes>
</systemProperties>
<jettyXmls>${project.basedir}/src/test/jetty/jetty.xml,${project.basedir}/src/test/jetty/jetty-ssl.xml,${project.basedir}/src/test/jetty/jetty-http.xml,${project.basedir}/src/test/jetty/jetty-https.xml</jettyXmls>
</configuration>
diff --git a/pom.xml b/pom.xml
index b1b878cbdb..af4192f148 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,12 +121,12 @@
<module>wicket-native-websocket</module>
<module>wicket-bean-validation</module>
<module>wicket-user-guide</module>
- <module>wicket-migration</module>
+ <module>wicket-migration</module>
<module>wicket-tester</module>
<module>wicket-extensions-tester</module>
<!-- must stay last: aggregates the JaCoCo data of every module above -->
<module>wicket-coverage</module>
- </modules>
+ </modules>
<properties>
<!-- Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -170,7 +170,7 @@
<error_prone_annotations.version>2.50.0</error_prone_annotations.version>
<forbiddenapis.version>3.10</forbiddenapis.version>
<jacoco.version>0.8.15</jacoco.version>
- <jackson.version>2.14.3</jackson.version>
+ <jackson.version>3.2.2</jackson.version>
<jakarta.annotation-api.version>3.0.0</jakarta.annotation-api.version>
<jakarta.el.version>4.0.2</jakarta.el.version>
<jakarta.el-api.version>6.0.0</jakarta.el-api.version>
@@ -179,9 +179,9 @@
<jakarta.servlet.jsp-api.version>4.0.0</jakarta.servlet.jsp-api.version>
<jakarta.validation-api.version>3.1.1</jakarta.validation-api.version>
<jakarta.websocket-api.version>2.2.0</jakarta.websocket-api.version>
- <jakarta.servlet-api.version>6.0.0</jakarta.servlet-api.version>
+ <jakarta.servlet-api.version>6.1.0</jakarta.servlet-api.version>
<jdk-serializable-functional.version>1.9.0</jdk-serializable-functional.version>
- <jetty.version>11.0.24</jetty.version>
+ <jetty.version>12.1.12</jetty.version>
<junit.version>6.1.3</junit.version>
<jsr305.version>3.0.2</jsr305.version>
<logback.version>1.2.7</logback.version>
@@ -290,12 +290,6 @@
<version>${hamcrest.version}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>${jackson.version}</version>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>com.github.openjson</groupId>
<artifactId>openjson</artifactId>
@@ -593,8 +587,18 @@
</exclusion>
</exclusions>
</dependency>
-
-
+ <dependency>
+ <groupId>tools.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>${jackson.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <!-- this one is reqired to patch extremely outdatet Xerces shipped with httpunit below -->
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.12.2</version>
+ </dependency>
<dependency>
<groupId>io.github.cdi-unit</groupId>
<artifactId>cdi-unit</artifactId>
@@ -625,15 +629,19 @@
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
+ <!--
+ eeXX MUST be aligned with servlet version
+ https://jakarta.ee/specifications/servlet/
+ -->
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-webapp</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-jakarta-server</artifactId>
+ <groupId>org.eclipse.jetty.ee11.websocket</groupId>
+ <artifactId>jetty-ee11-websocket-jakarta-server</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
@@ -1195,12 +1203,12 @@
<version>${build-helper-maven-plugin.version}</version>
</plugin>
<plugin>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
- <scanIntervalSeconds>60</scanIntervalSeconds>
- <webAppSourceDirectory>src/main/webapp</webAppSourceDirectory>
+ <scan>60</scan>
+ <baseResource>src/main/webapp</baseResource>
</configuration>
</plugin>
<plugin>
diff --git a/testing/wicket-js-tests/pom.xml b/testing/wicket-js-tests/pom.xml
index d1a614abc5..d0af8bbc9a 100644
--- a/testing/wicket-js-tests/pom.xml
+++ b/testing/wicket-js-tests/pom.xml
@@ -50,8 +50,8 @@
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-webapp</artifactId>
</dependency>
</dependencies>
diff --git a/testing/wicket-js-tests/src/test/java/org/apache/wicket/testing/jstest/StartJavaScriptTests.java b/testing/wicket-js-tests/src/test/java/org/apache/wicket/testing/jstest/StartJavaScriptTests.java
index d16011ab79..5cbeca2145 100644
--- a/testing/wicket-js-tests/src/test/java/org/apache/wicket/testing/jstest/StartJavaScriptTests.java
+++ b/testing/wicket-js-tests/src/test/java/org/apache/wicket/testing/jstest/StartJavaScriptTests.java
@@ -30,8 +30,9 @@ import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
import org.eclipse.jetty.util.resource.Resource;
+import org.eclipse.jetty.util.resource.ResourceFactory;
import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.eclipse.jetty.webapp.WebAppContext;
+import org.eclipse.jetty.ee11.webapp.WebAppContext;
/**
* Separate startup class for people that want to run the examples directly. Use parameter
@@ -64,7 +65,7 @@ public class StartJavaScriptTests
server.addConnector(http);
- Resource keystore = Resource.newClassPathResource("/keystore");
+ Resource keystore = ResourceFactory.root().newClassLoaderResource("/keystore");
if (keystore != null && keystore.exists())
{
// if a keystore for a SSL certificate is available, start a SSL
@@ -114,9 +115,9 @@ public class StartJavaScriptTests
try
{
server.start();
-
+
browse();
-
+
server.join();
}
catch (Exception e)
diff --git a/testing/wicket-threadtest/pom.xml b/testing/wicket-threadtest/pom.xml
index 198c1bc138..fa012d9422 100644
--- a/testing/wicket-threadtest/pom.xml
+++ b/testing/wicket-threadtest/pom.xml
@@ -45,9 +45,9 @@
</exclusion>
</exclusions>
</dependency>
- </dependencies>
+ </dependencies>
</dependencyManagement>
-
+
<dependencies>
<dependency>
<groupId>commons-httpclient</groupId>
@@ -67,8 +67,8 @@
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-webapp</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/wicket-core-tests/src/test/java/org/apache/wicket/protocol/http/WebApplicationTest.java b/wicket-core-tests/src/test/java/org/apache/wicket/protocol/http/WebApplicationTest.java
index ca6c333de7..ae31653af3 100644
--- a/wicket-core-tests/src/test/java/org/apache/wicket/protocol/http/WebApplicationTest.java
+++ b/wicket-core-tests/src/test/java/org/apache/wicket/protocol/http/WebApplicationTest.java
@@ -149,7 +149,7 @@ class WebApplicationTest extends WicketTestCase
};
// character encoding not set yet
- request.setCharacterEncoding(null);
+ request.setCharacterEncoding((String)null);
application.createWebRequest(request, "/");
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/BufferedHttpServletResponse.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/BufferedHttpServletResponse.java
index a7a971b496..8cd3a0046e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/BufferedHttpServletResponse.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/BufferedHttpServletResponse.java
@@ -42,7 +42,7 @@ import org.apache.wicket.util.string.AppendingStringBuffer;
* Implementation of {@link HttpServletResponse} that saves the output in a string buffer. This is
* used in REDIRECT_TO_BUFFER render strategy to create the buffer of the output that can be held on
* to until the redirect part of the render strategy.
- *
+ *
* @author jcompagner
*/
class BufferedHttpServletResponse implements HttpServletResponse
@@ -71,7 +71,7 @@ class BufferedHttpServletResponse implements HttpServletResponse
/**
* Constructor.
- *
+ *
* @param realResponse
* The real response for encoding the url
*/
@@ -158,6 +158,16 @@ class BufferedHttpServletResponse implements HttpServletResponse
redirect = location;
}
+ /**
+ * @see jakarta.servlet.http.HttpServletResponse#sendRedirect(java.lang.String,int,boolean)
+ */
+ @Override
+ public void sendRedirect(String location, int sc, boolean clearBuffer) throws IOException {
+ isOpen();
+ redirect = location;
+ realResponse.sendRedirect(location, sc, clearBuffer);
+ }
+
/**
* @return The redirect url
*/
@@ -266,7 +276,7 @@ class BufferedHttpServletResponse implements HttpServletResponse
/**
* Set the character encoding to use for the output.
- *
+ *
* @param encoding
*/
@Override
@@ -423,7 +433,7 @@ class BufferedHttpServletResponse implements HttpServletResponse
}
/**
- *
+ *
*/
public void close()
{
@@ -438,9 +448,9 @@ class BufferedHttpServletResponse implements HttpServletResponse
/**
* Convert the string into the output encoding required
- *
+ *
* @param output
- *
+ *
* @param encoding
* The output encoding
* @return byte[] The encoded characters converted into bytes
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletResponse.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletResponse.java
index 684dde00a8..539d72c02a 100755
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletResponse.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletResponse.java
@@ -46,7 +46,7 @@ import org.apache.wicket.util.value.ValueMap;
/**
* Mock servlet response. Implements all of the methods from the standard HttpServletResponse class
* plus helper methods to aid viewing the generated response.
- *
+ *
* @author Chris Turner
*/
public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBufferingWebResponse
@@ -83,7 +83,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Create the response object.
- *
+ *
* @param servletRequest
*/
public MockHttpServletResponse(MockHttpServletRequest servletRequest)
@@ -93,7 +93,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Add a cookie to the response.
- *
+ *
* @param cookie
* The cookie to add
*/
@@ -116,7 +116,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Add a date header.
- *
+ *
* @param name
* The header value
* @param l
@@ -131,7 +131,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Add the given header value, including an additional entry if one already exists.
- *
+ *
* @param name
* The name for the header
* @param value
@@ -152,7 +152,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Add an int header value.
- *
+ *
* @param name
* The header name
* @param i
@@ -166,7 +166,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Check if the response contains the given header name.
- *
+ *
* @param name
* The name to check
* @return Whether header in response or not
@@ -180,7 +180,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Encode the redirectLocation URL. Does no changes as this test implementation uses cookie
* based url tracking.
- *
+ *
* @param url
* The url to encode
* @return The encoded url
@@ -193,7 +193,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Encode the URL. Does no changes as this test implementation uses cookie based url tracking.
- *
+ *
* @param url
* The url to encode
* @return The encoded url
@@ -206,7 +206,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Flush the buffer.
- *
+ *
* @throws IOException
*/
@Override
@@ -216,7 +216,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the binary content that was written to the servlet stream.
- *
+ *
* @return The binary content
*/
public byte[] getBinaryContent()
@@ -226,7 +226,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Return the current buffer size
- *
+ *
* @return The buffer size
*/
@Override
@@ -248,7 +248,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the character encoding of the response.
- *
+ *
* @return The character encoding
*/
@Override
@@ -260,7 +260,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get all of the cookies that have been added to the response.
- *
+ *
* @return The collection of cookies
*/
public List<Cookie> getCookies()
@@ -275,7 +275,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the text document that was written as part of this response.
- *
+ *
* @return The document
*/
public String getDocument()
@@ -292,7 +292,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the error message.
- *
+ *
* @return The error message, or null if no message
*/
public String getErrorMessage()
@@ -302,7 +302,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Return the value of the given named header.
- *
+ *
* @param name
* The header name
* @return The value, or null
@@ -324,7 +324,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the names of all of the headers.
- *
+ *
* @return The header names
*/
@Override
@@ -335,7 +335,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the encoded locale
- *
+ *
* @return The locale
*/
@Override
@@ -346,7 +346,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the output stream for writing binary data from the servlet.
- *
+ *
* @return The binary output stream.
*/
@Override
@@ -362,7 +362,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the location that was redirected to.
- *
+ *
* @return The redirect location, or null if not a redirect
*/
public String getRedirectLocation()
@@ -372,7 +372,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the status code.
- *
+ *
* @return The status code
*/
@Override
@@ -383,7 +383,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Get the print writer for writing text output for this response.
- *
+ *
* @return The writer
* @throws IOException
* Not used
@@ -452,7 +452,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Always returns false.
- *
+ *
* @return Always false
*/
@Override
@@ -463,7 +463,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Return whether the servlet returned an error code or not.
- *
+ *
* @return Whether an error occurred or not
*/
public boolean isError()
@@ -473,7 +473,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Check whether the response was redirected or not.
- *
+ *
* @return Whether the state was redirected or not
*/
public boolean isRedirect()
@@ -508,7 +508,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Send an error code. This implementation just sets the internal error state information.
- *
+ *
* @param code
* The code
* @throws IOException
@@ -523,7 +523,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Send an error code. This implementation just sets the internal error state information.
- *
+ *
* @param code
* The error code
* @param msg
@@ -541,7 +541,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Indicate sending of a redirectLocation to a particular named resource. This implementation
* just keeps hold of the redirectLocation info and makes it available for query.
- *
+ *
* @param location
* The location to redirectLocation to
* @throws IOException
@@ -554,9 +554,28 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
status = HttpServletResponse.SC_FOUND;
}
+ /**
+ * Indicate sending of a redirectLocation to a particular named resource and status code.
+ * This implementation just keeps hold of the redirectLocation info and makes it available for query.
+ *
+ * @param location
+ * The location to redirectLocation to
+ * @param sc
+ * The status code
+ * @param clearBuffer
+ * no-op
+ * @throws IOException
+ * Not used
+ */
+ @Override
+ public void sendRedirect(String location, int sc, boolean clearBuffer) throws IOException {
+ redirectLocation = location;
+ status = sc;
+ }
+
/**
* Method ignored.
- *
+ *
* @param size
* The size
*/
@@ -567,7 +586,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set the character encoding.
- *
+ *
* @param characterEncoding
* The character encoding
*/
@@ -579,7 +598,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set the content length.
- *
+ *
* @param length
* The length
*/
@@ -597,7 +616,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set the content type.
- *
+ *
* @param type
* The content type
*/
@@ -618,7 +637,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set a date header.
- *
+ *
* @param name
* The header name
* @param l
@@ -651,7 +670,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Format HTTP date "EEE, dd MMM yyyy HH:mm:ss 'GMT'" or "EEE, dd-MMM-yy HH:mm:ss 'GMT'"for
* cookies
- *
+ *
* @param buf
* @param calendar
* @param cookie
@@ -720,7 +739,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set the given header value.
- *
+ *
* @param name
* The name for the header
* @param value
@@ -736,7 +755,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set an int header value.
- *
+ *
* @param name
* The header name
* @param i
@@ -750,7 +769,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set the locale in the response header.
- *
+ *
* @param locale
* The locale
*/
@@ -762,7 +781,7 @@ public class MockHttpServletResponse implements HttpServletResponse, IMetaDataBu
/**
* Set the status for this response.
- *
+ *
* @param status
* The status
*/
diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml
index fa8d45e140..4463cdb7ff 100644
--- a/wicket-examples/pom.xml
+++ b/wicket-examples/pom.xml
@@ -165,8 +165,8 @@
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-webapp</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -174,8 +174,8 @@
<artifactId>jetty-jmx</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-jakarta-server</artifactId>
+ <groupId>org.eclipse.jetty.ee11.websocket</groupId>
+ <artifactId>jetty-ee11-websocket-jakarta-server</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
@@ -237,8 +237,8 @@
<artifactId>maven-war-plugin</artifactId>
</plugin>
<plugin>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
@@ -266,8 +266,8 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-maven-plugin</artifactId>
<version>${jetty.version}</version>
<dependencies>
<dependency>
diff --git a/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java b/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
index 96ba0f8240..465e0bec95 100644
--- a/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
+++ b/wicket-examples/src/test/java/org/apache/wicket/examples/JettyTestCaseDecorator.java
@@ -20,7 +20,7 @@ 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.webapp.WebAppContext;
+import org.eclipse.jetty.ee11.webapp.WebAppContext;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -28,7 +28,7 @@ import com.meterware.httpunit.HttpUnitOptions;
/**
* Test decorator that starts a jetty instance
- *
+ *
* @author ivaynberg
*/
public class JettyTestCaseDecorator
@@ -59,17 +59,16 @@ public class JettyTestCaseDecorator
server.addConnector(http);
WebAppContext web = new WebAppContext();
- if (contextPath == null)
- web.setContextPath("/wicket-examples");
- else
- web.setContextPath(contextPath);
+ web.setContextPath(contextPath == null ? "/wicket-examples" : contextPath);
if (webappLocation == null)
{
String basedir = System.getProperty("basedir");
String path = "";
if (basedir != null)
+ {
path = basedir + "/";
+ }
path += "src/main/webapp";
web.setWar(path);
diff --git a/wicket-examples/src/test/java/org/apache/wicket/examples/StartExamples.java b/wicket-examples/src/test/java/org/apache/wicket/examples/StartExamples.java
index 1064e89e5f..48b936f12a 100644
--- a/wicket-examples/src/test/java/org/apache/wicket/examples/StartExamples.java
+++ b/wicket-examples/src/test/java/org/apache/wicket/examples/StartExamples.java
@@ -28,13 +28,14 @@ import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.SslConnectionFactory;
-import org.eclipse.jetty.server.session.DefaultSessionCache;
-import org.eclipse.jetty.server.session.FileSessionDataStore;
-import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.session.DefaultSessionCache;
+import org.eclipse.jetty.session.FileSessionDataStore;
+import org.eclipse.jetty.ee11.servlet.ServletContextHandler;
import org.eclipse.jetty.util.resource.Resource;
+import org.eclipse.jetty.util.resource.ResourceFactory;
import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.eclipse.jetty.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer;
+import org.eclipse.jetty.ee11.webapp.WebAppContext;
+import org.eclipse.jetty.ee11.websocket.jakarta.server.config.JakartaWebSocketServletContainerInitializer;
/**
* Separate startup class for people that want to run the examples directly. Use parameter
@@ -64,7 +65,7 @@ public class StartExamples
server.addConnector(http);
- Resource keystore = Resource.newClassPathResource("/keystore");
+ Resource keystore = ResourceFactory.root().newClassLoaderResource("/keystore");
if (keystore != null && keystore.exists())
{
// if a keystore for a SSL certificate is available, start a SSL
diff --git a/wicket-extensions/pom.xml b/wicket-extensions/pom.xml
index 6da475cd8c..8e858528a9 100644
--- a/wicket-extensions/pom.xml
+++ b/wicket-extensions/pom.xml
@@ -75,15 +75,15 @@ org.apache.wicket.extensions.wizard.dynamic;-noimport:=true
<osgi.import.package>!java*,!kotlin*,!sun.nio.ch,org.slf4j*;version="[1.7,3)",*</osgi.import.package>
</properties>
<dependencies>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
</dependency>
+ <dependency>
+ <groupId>tools.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-tester</artifactId>
diff --git a/wicket-extensions/src/main/java/module-info.java b/wicket-extensions/src/main/java/module-info.java
index 5b90e73de6..d4d4dc4784 100644
--- a/wicket-extensions/src/main/java/module-info.java
+++ b/wicket-extensions/src/main/java/module-info.java
@@ -19,7 +19,7 @@ module org.apache.wicket.extensions {
requires java.desktop;
requires static jakarta.servlet;
requires org.slf4j;
- requires com.fasterxml.jackson.databind;
+ requires tools.jackson.databind;
requires com.github.openjson;
requires org.apache.commons.fileupload2.core;
requires org.apache.wicket.util;
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/requestlogger/JsonRequestLogger.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/requestlogger/JsonRequestLogger.java
index 95a0aaa2f2..1556c4547f 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/requestlogger/JsonRequestLogger.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/requestlogger/JsonRequestLogger.java
@@ -16,15 +16,16 @@
*/
package org.apache.wicket.extensions.requestlogger;
-import java.io.IOException;
import java.io.Serializable;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.introspect.Annotated;
-import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
-import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
-import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
+import tools.jackson.databind.ObjectMapper;
+import tools.jackson.databind.SerializationFeature;
+import tools.jackson.databind.cfg.MapperConfig;
+import tools.jackson.databind.introspect.Annotated;
+import tools.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import tools.jackson.databind.json.JsonMapper;
+import tools.jackson.databind.ser.std.SimpleBeanPropertyFilter;
+import tools.jackson.databind.ser.std.SimpleFilterProvider;
import org.apache.wicket.protocol.http.AbstractRequestLogger;
import org.apache.wicket.protocol.http.RequestLogger;
import org.slf4j.Logger;
@@ -33,17 +34,17 @@ import org.slf4j.LoggerFactory;
/**
* JsonRequestLogger uses Jackson to log requests in JSON-format. You will need jackson-mapper in
* your classpath, ie. like:
- *
+ *
* <pre>
* {@literal
* <dependency>
- * <groupId>com.fasterxml.jackson.core</groupId>
+ * <groupId>tools.jackson.core</groupId>
* <artifactId>jackson-databind</artifactId>
- * <version>2.7.1</version>
+ * <version>3.2.2</version>
* </dependency>
* }
* </pre>
- *
+ *
* @author Emond Papegaaij
*/
public class JsonRequestLogger extends AbstractRequestLogger
@@ -58,7 +59,7 @@ public class JsonRequestLogger extends AbstractRequestLogger
private static final class FilteredIntrospector extends JacksonAnnotationIntrospector
{
@Override
- public Object findFilterId(Annotated a)
+ public Object findFilterId(MapperConfig<?> config, Annotated a)
{
return "default";
}
@@ -98,13 +99,14 @@ public class JsonRequestLogger extends AbstractRequestLogger
*/
public JsonRequestLogger()
{
- mapper = new ObjectMapper();
- mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
SimpleFilterProvider filters = new SimpleFilterProvider();
filters.addFilter("default",
SimpleBeanPropertyFilter.serializeAllExcept("eventTarget", "responseTarget"));
- mapper.setFilterProvider(filters);
- mapper.setAnnotationIntrospector(new FilteredIntrospector());
+ mapper = JsonMapper.builder()
+ .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
+ .filterProvider(filters)
+ .annotationIntrospector(new FilteredIntrospector())
+ .build();
}
/**
@@ -126,13 +128,6 @@ public class JsonRequestLogger extends AbstractRequestLogger
protected String getLogString(RequestData rd, SessionData sd)
{
- try
- {
- return getMapper().writeValueAsString(new RequestSessionTuple(rd, sd));
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
+ return getMapper().writeValueAsString(new RequestSessionTuple(rd, sd));
}
}
diff --git a/wicket-migration/pom.xml b/wicket-migration/pom.xml
index 7a612495d8..74698b917a 100644
--- a/wicket-migration/pom.xml
+++ b/wicket-migration/pom.xml
@@ -59,7 +59,7 @@
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
@@ -75,7 +75,7 @@
<exclusion>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
- </exclusion>
+ </exclusion>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>*</artifactId>
diff --git a/wicket-native-websocket/wicket-native-websocket-javax/pom.xml b/wicket-native-websocket/wicket-native-websocket-javax/pom.xml
index 4bc56f43b8..777c3724ee 100644
--- a/wicket-native-websocket/wicket-native-websocket-javax/pom.xml
+++ b/wicket-native-websocket/wicket-native-websocket-javax/pom.xml
@@ -60,12 +60,12 @@
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <groupId>org.eclipse.jetty.ee11</groupId>
+ <artifactId>jetty-ee11-webapp</artifactId>
</dependency>
<dependency>
- <groupId>org.eclipse.jetty.websocket</groupId>
- <artifactId>websocket-jakarta-server</artifactId>
+ <groupId>org.eclipse.jetty.ee11.websocket</groupId>
+ <artifactId>jetty-ee11-websocket-jakarta-server</artifactId>
</dependency>
</dependencies>
</project>