The main topic in Wicket 10 is the migration from Javax APIs to Jakarta APIs.
As a result Wicket upgraded its dependency of Spring Framework to 6.x which also led to requirement to use Java 17 for building and running Wicket applications.
Apache Wicket 10 provides automatic migration based on OpenRewrite.
Usage:
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.apache.wicket:wicket-migration:LATEST -DactiveRecipes=org.apache.wicket.BestPractices |
TL;DR: Add org.apache.wicket:wicket-tester as a test dependency to your project and fix the imports in your project.
Until now WicketTester class was a member of the wicket-core module. But it depends on JUnit to do its job and this caused problems in JPMS (Java 9+ modules) because JPMS does not support optional dependencies like Maven/Gradle do. For this reason WicketTester and the other **Tester classes have been extracted to a new Maven/JPMS module - wicket-tester. Same is valid for WebSocketTester - it has been moved to wicket-web-socket-tester module,
Since Wicket 10.0 requires Servlet 5.0+ the HTTP2 PushBuilder abstraction has been moved from wicket-experimental/wicket-http2/wicket-http2-servlet4 and wicket-http2-core to wicket-core module.
PushHeaderItem class has been moved to package org.apache.wicket.markup.head.http2.
When org.apache.wicket.settings.DebugSettings#isOutputMarkupContainerClassName() returns true then the MarkupContainer class name should be rendered as an attribute of the component tag instead of as an HTML comment because an HTML comment may break a CSS rule, e.g. by appearing between two sibling HTML elements.
For example:
With CSS rule like p + p {color: red;} then the text color of any paragraph that follows another paragraph will be red. But if an HTML comment appears between them then the rule won't apply.
ApplicationContextMock now uses internally an instance of DefaultListableBeanFactory and this way it implements almost all methods of Spring's ApplicationContext. In addition ApplicationContextMock now extends from Spring's AbstractApplicationContext and thus could be used fully in AnnotProxyFieldValueFactory and SpringBeanLocator.
Wicket used CGLib for creating serializable proxies for classes. CGLib is not well maintained since several years and it does not work with JDK 17 where illegal access is no more allowed. For this reason it usage has been replaced with ByteBuddy library.
This is a change in implementation in wicket-ioc module, without API changes for the end-user applications!
I.e. Jakarta APIs
Upgrade Guice to 7.0.0 WICKET-7053
Upgrade Jackson to 2.13.4 WICKET-7009