Skip to content

Fix Jakarta EE 10 web.xml migration#1159

Open
sakshichitnis27 wants to merge 1 commit into
openrewrite:mainfrom
sakshichitnis27:fix/7471-jakarta-web-xml-ee10
Open

Fix Jakarta EE 10 web.xml migration#1159
sakshichitnis27 wants to merge 1 commit into
openrewrite:mainfrom
sakshichitnis27:fix/7471-jakarta-web-xml-ee10

Conversation

@sakshichitnis27

@sakshichitnis27 sakshichitnis27 commented Jul 1, 2026

Copy link
Copy Markdown

Replaces the plain text FindAndReplace steps for web.xml with XML-aware ChangeTagValue steps so web.xml remains an XML LST. This allows the later JakartaWebXml6 recipe in the JakartaEE10 chain to update web.xml from version 5.0 to 6.0.

Adds a regression test for the JakartaEE10 chain.

Verified:

  • ./gradlew test --tests "org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXmlTest"
  • ./gradlew test --tests "org.openrewrite.java.migrate.jakarta.JakartaEE10Test"

Comment on lines +49 to +50
- org.openrewrite.FindSourceFiles:
filePattern: '**/web.xml'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might this be misplaced? As the precondition here will only match web.xml files, which means none of the ChangeDependency recipes it guards will ever match or make changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to add the precondition only to name: org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

JavaxWebXmlToJakartaWebXml uses FindAndReplace which partially breaks Jakarta EE 10 migration

2 participants