Version 2.0.0-rc-1
Released on 2022-05-13.
Ratpack 2.0.0-rc-1 is now available!
This release is the first candidate for the next major version of Ratpack and is intended to identify any significant issues or regressions that may have occurred. As a major version release, this release include a number of breaking changes for applications.
Package & Module Changes
This release includes changes to Ratpack's modules and Java package naming structure to align with Java Platform Module System (JPMS) introduced in Java 9. Each module now contains one unique package name across the framework's libraries. The libraries do not contain module-info.java
files at this time.
To facilitate this change, a number of core API classes were moved to new packages and some additional package were added.
New Modules
ratpack-config
: contains the code for Ratpack's configuration binding systemratpack-func
: contains the collection of functional interface definitions used across Ratpack's code base.
Removed Modules
The following deprecated modules have now been removed and are not published in this release.
ratpack-base
(collapsed intoratpack-exec
)ratpack-hystrix
(Hystrix is no longer maintained, relies onratpack-rx
which is removed)ratpack-pac4j
(in favor of https://github.com/pac4j/ratpack-pac4j)ratpack-remote
(obsolete due to additions ofImposition
andRatpackServer.getRegistry()
,URLClassLoader
no longer supported in Java > 9)ratpack-remote-test
(obsolete due to additions ofImposition
andRatpackServer.getRegistry()
,URLClassLoader
no longer supported in Java > 9)ratpack-rx
(in favor ofratpack-rx2
)ratpack-thymeleaf
(in favor ofratpack-thymeleaf3
)
Package Relocations
The following package relocations are provided as assistance in identifying the updates needed in client applications. This list may not be exhaustive.
ratpack.api
→ratpack.exec.api
ratpack.config
→ moved toratpack-config
moduleratpack.error
→ratpack.core.error
ratpack.file
→ratpack.core.file
ratpack.form
→ratpack.core.form
ratpack.func
→ moved toratpack-func
moduleratpack.handling
→ratpack.core.handling
ratpack.health
→ratpack.core.health
ratpack.http
→ratpack.core.http
ratpack.impose
→ratpack.core.impose
ratpack.jackson
→ratpack.core.jackson
ratpack.logging
→ratpack.core.logging
ratpack.parse
→ratpack.core.parse
ratpack.path
→ratpack.core.path
ratpack.registry
→ratpack.exec.registry
ratpack.reload
→ratpack.core.reload
ratpack.render
→ratpack.core.render
ratpack.server
→ratpack.core.server
ratpack.service
→ratpack.core.service
ratpack.sse
→ratpack.core.sse
ratpack.ssl
→ratpack.core.ssl
ratpack.stream
→ratpack.exec.stream
ratpack.util
→ratpack.exec.util
ratpack.websocket
→ratpack.core.websocket
Breaking Required Version Updates
A number of dependencies were updates to their latest versions and support for older versions dropped. This may result in breaking changes to applications builds and tests when using Ratpack 2.0.0-rc-1.
ratpack-gradle
updated to 7.4 and dropped support for running in projects with < Gradle 7.0.groovy
updated to 3.0.9.spock
updated to 2.1-groovy-3.0
A number of other core dependencies have been upgraded:
- netty 4.1.48.FINAL → 4.1.73.FINAL
- netty-tcnative 2.0.30.FINAL → 2.0.48.FINAL
- guava 28.2-jre → 31.0.1-jre
- groovy 2.5.4→ 3.0.9
- rxjava2 2.1.2 → 2.2.21
- reactor 3.1.8.RELEASE → 3.4.14
- jackson 2.10.3 → 2.13.1
- dropwizard metrics 4.1.6 → 4.2.8
- pegdown 1.5.0 → 1.6.0
- log4j 2.13.1 → 2.17.1
- newrelic 3.15.0 → 5.13.0
- reactiveStreams 1.0.2 → 1.0.3
- guice 4.1.0 → 5.1.0
- caffeine 2.8.1 → 2.9.3 (the 3.x versions required Java 11)
- retrofit 2.8.1 → 2.9.0
- commons-codec 1.10 → 1.14
- snakeyaml 1.23 → 1.30
- commons-lang3 3.3.2 → 3.12
- springboot 1.3.RELEASE → 2.6.3
- gradle 6.5.1 → 7.4
Breaking Code Changes
All previously @Deprecated
methods have been removed from the public API. Client application's will need to updated accordingly. Refer to the javadoc of your current version to identify the replacement version.
The Request.getClientCertificates()
method has been removed and replaced with [Request.getSslSession()
](https://ratpack.io/manual/2.0.0-rc-1/api/ratpack/core/http/Request.html#getSslSession()). This method allows a Ratpack server to access all available SSL session information for an incoming request.
The [ExecController.of
](https://ratpack.io/manual/2.0.0-rc-1/api/ratpack/exec/ExecController.html#of(ratpack.func.Action)) method has been added to support initializing Ratpack's Execution and Promise model outside of a Ratpack server. Users that were previously using internal API of new DefaultExecController()
should now migrate to this public API.
The Ratpack server can now be configured to handle multiple SSL server certificates using SNI. This may require changes to an application's configuration if configuring SSL. See the SSL Configuration docs to more details.
There are also a few other new convenience methods added to support easier development and testing of Ratpack applications. Thanks to all who contributed.
We hope you enjoy Ratpack 2.0-rc-1 and open issues for any regression that are discovered when migrating applications.
--
Team Ratpack
Links
Pull Requests (20)
- [1438] - Upgrade SpringBoot to 2.1.3 (beckje01)
- [1476] - Remove ratpack-pac4j (michaelschlies)
- [1501] - Add support for binary websocket frames (marcphilipp)
- [1524] - Collapse ratpack-base into ratpack-exec and export single package (johnrengelman)
- [1537] - Collapse ratpack-core packages into ratpack.core (johnrengelman)
- [1541] - Remove modules (johnrengelman)
- [1543] - migrate to io.lettuce package, upgrade rxjava and reactor to match (johnrengelman)
- [1544] - Caching CachingUpstream to do tail recursion to avoid stack overflows (johnrengelman)
- [1546] - Remove deprecated methods and classes (johnrengelman)
- [1550] - Ratpack-Config and Ratpack-Func modules (johnrengelman)
- [1558] - Dependency updates (johnrengelman)
- [1611] - Update manual for Gradle configuration names that cause errors in Gradle 7 (runtime, etc.) (davidmc24)
- [1628] - Add takeWhile to Streams and TransformablePublisher (leonard84)
- [1630] - Add SNI support for server and httpClient. (johnrengelman)
- [1631] - Capture NotSslRecordExceptions and log warning (johnrengelman)
- [1632] - Add public API for ExecController. (johnrengelman)
- [1635] - Replace Request.getClientCertificate() with Request.getSslSession(). (johnrengelman)
- [1639] - Improve Gradle build cacheability (jprinet)
- [1640] - Groovy 3 (johnrengelman)
- [1641] - Update Gradle Enterprise plugins to latest (jprinet)
Resolved Issues (16)
- [1221] - Java 9 support
- [1273] - Ratpack unusable in modular JDK9 applications due to package splits
- [1279] - Run CI builds against Java 9
- [1403] - HttpClient connection pooling does not set Connection header
- [1532] - Create ratpack-config module
- [1538] - Remove obsolete modules
- [1540] - RemoteControl library does not support Java 9+
- [1542] - Update lettuce dependency in ratpack-session-redis to io.lettuce group
- [1557] - Update Guice version
- [1566] - Gradle plugin expects server instances to be implementation type
- [1574] - Supporting JDK 15
- [1587] - Update to Guice 5.0.1
- [1599] - Migrate from javax.security.cert to java.security.cert
- [1616] - Groovy v3 compatbility
- [1627] - Support for Server Name Indication (TLS) on the server
- [1654] - Runtime issues while running ratpack on jdk17 and guice-5.1.10 with certificates based request