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.


Automatic migration

Add migration recipes to Wicket 10 WICKET-7029


Apache Wicket 10 provides automatic migration based on OpenRewrite.

Usage:

Maven command
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.apache.wicket:wicket-migration:LATEST -DactiveRecipes=org.apache.wicket.BestPractices


TODO

Use stable version of Commons FileUpload FILEUPLOAD-309

Re-enable cdi-unit tests once there is a new release cdi-unit#195

Changes

WicketTester and related classes have been extracted to wicket-tester Maven module WICKET-7072

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,

wicket-http2 module have been merged to wicket-core module WICKET-6887

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.

Render MarkupContainer class name as an attribute WICKET-6890

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.

Make ApplicationContextMock smarter by delegating to DefaultListableBeanFactory WICKET-6893

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.

Replace CGLib with ByteBuddy WICKET-6913

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!  


Dependencies

Wicket 10 requires Java 17

Wicket 10 requires Servlet 5+

I.e. Jakarta APIs

Spring Framework to 6.x WICKET-6940

Guice to 7.x

Upgrade Guice to 7.0.0 WICKET-7053

Commons Fileupload to 2.x WICKET-6915

Jackson to 2.13.x

Upgrade Jackson to 2.13.4 WICKET-7009

  • No labels