JettyUpgradeEE9 also upgrades the other Jetty dependencies, the servlet packages and the Java version - #1274
Merged
Merged
Conversation
jkschneider
force-pushed
the
jakarta/jetty-12-baseline
branch
from
October 3, 2026 22:26
a373a5f to
55de06b
Compare
jkschneider
added this pull request to stack #1283
October 3, 2026 22:39
jkschneider
added a commit
that referenced
this pull request
Oct 4, 2026
#1271) * javax-reflective-names-retained: migrate runtime Jakarta type names * maven-coordinate-literal-retained: migrate validation artifact lookups (#1272) * weld-javax-provider-retained: align Weld core with Jakarta CDI (#1273) * `JettyUpgradeEE9` also upgrades the other Jetty dependencies, the servlet packages and the Java version (#1274) * jetty-ee9-java-baseline: align Jetty dependencies packages and Java baseline * jetty-ee9-java-baseline: leave standalone Jetty utility dependencies unchanged * jetty-ee9-java-baseline: require a direct dependency before upgrading Java * `JacksonJavaxToJakarta` keeps newer Jackson versions and shared version properties when relocating artifacts (#1275) * jackson-version-downgrade: preserve newer versions and shared properties * jackson-shared-version-property-split: cover older shared Jackson versions * The Jakarta JAXB migration keeps the `javax.xml.bind` API for Arquillian Recorder 1.x binaries (#1276) * recorder-javax-jaxb-api-removed: retain the API needed by Recorder binaries * recorder-javax-jaxb-api-removed: limit retention to external binaries after migration * hibernate-validator-javax-provider-retained: migrate legacy validation providers (#1277) * legacy-javaee-api-coordinate-retained: migrate legacy annotation EL and EJB aliases (#1278) * The Jakarta migration keeps a provided API provided instead of adding it again in compile scope (#1279) * cdi-provided-scope-promoted: preserve provided CDI API scope * cdi-provided-scope-promoted: distinguish provided declarations from runtime APIs * provided-api-scope-overwritten: preserve provided Mail API scope * provided-api-scope-overwritten: preserve container API scopes across Jakarta migrations * The Jackson Jakarta migration adds the `defaultView` parameter to `ProviderBase._configForWriting` overrides (#1280) * jackson-provider-override-signature: forward the default view parameter * jackson-provider-override-signature: update callers of migrated overrides * invocation-context-get-constructor-missing: complete legacy decorators (#1281) * jakarta-api-duplicates-platform: respect provided platform APIs (#1282)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JettyUpgradeEE9relocatedjetty-servletand its siblings to the Jetty 12ee9artifacts but left an explicitjetty-server9.4 beside them, keptorg.eclipse.jetty.servletimports that no longer exist, and kept Java 8 or 11 although Jetty 12 needs 17. It now also upgrades declaredorg.eclipse.jettyartifacts to 12.0.x, moves theservlet,servlets,webappandannotationspackages toorg.eclipse.jetty.ee9, castsConnector.getPort()receivers toNetworkConnector(new recipeJettyConnectorGetPort), and raises the Java version to 17 (UpgradeJavaForJetty12). The dependency and Java upgrades are guarded by new scanning recipeHasJettyDependency, which needs a direct Maven or Gradle dependency on one of the Jetty 8 to 11 servlet or WebSocket artifacts this recipe relocates and then marks every build file in the repository, so a parent POM's Java version is raised too. A build that only usesjetty-util, or gets the servlet artifacts transitively, is left alone, and the recipe stays on Jetty 12 rather than 11 becauseJakartaEE10composes it and expects theee9artifacts.Found by a team of coding agents reviewing a Moderne run of
org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartaover the 31 Arquillian repositories (run 20261003120559-YQoma). The issue isjetty-ee9-java-baselinein the run'sio.moderne.RecipeIssuesdata table (4 rows), and the fix was discussed and reviewed on the run's message board. A row from the table, as a generalized example:Jetty servlet is upgraded to 12 while its explicit server dependency and Java baseline remain incompatible. (
arquillian/smart-testing-dogfood-repo,protocols/servlet/pom.xml, recipeorg.openrewrite.java.migrate.jakarta.JettyUpgradeEE9)Before:
What the recipe produced:
Expected:
Stacked on #1273 (11 of 19); merge that one first.