Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit JavaxBeansXmlToJakartaBeansXml to beans.xml #386

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/resources/META-INF/rewrite/jakarta-ee-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ tags:
- jakarta
- beans
- cdi
preconditions:
- org.openrewrite.FindSourceFiles:
filePattern: '**/beans.xml'
recipeList:
- org.openrewrite.xml.ChangeTagAttribute:
attributeName: version
Expand Down
8 changes: 3 additions & 5 deletions src/main/resources/META-INF/rewrite/jakarta-ee-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -847,35 +847,33 @@ type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.jakarta.JavaxPersistenceXmlToJakartaPersistenceXml
displayName: Migrate xmlns entries in `persistence.xml` files
description: Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
preconditions:
- org.openrewrite.FindSourceFiles:
filePattern: '**/persistence.xml'
recipeList:
- org.openrewrite.xml.ChangeTagAttribute:
attributeName: name
elementName: //property
oldValue: javax.persistence
newValue: jakarta.persistence
fileMatcher: "**/persistence.xml"
- org.openrewrite.xml.ChangeTagAttribute:
attributeName: version
elementName: persistence
newValue: 3.0
fileMatcher: "**/persistence.xml"
- org.openrewrite.xml.ChangeTagAttribute:
attributeName: xmlns
elementName: persistence
oldValue: http://xmlns.jcp.org
newValue: https://jakarta.ee
fileMatcher: "**/persistence.xml"
- org.openrewrite.xml.ChangeTagAttribute:
attributeName: xmlns
elementName: persistence
oldValue: http://java.sun.com/xml/ns/persistence
newValue: https://jakarta.ee/xml/ns/persistence
fileMatcher: "**/persistence.xml"
- org.openrewrite.xml.ChangeTagAttribute:
attributeName: xsi:schemaLocation
elementName: persistence
newValue: https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd
fileMatcher: "**/persistence.xml"
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta
Expand Down