Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
18 changes: 12 additions & 6 deletions src/main/resources/META-INF/rewrite/jakarta-ee-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -721,19 +721,25 @@ tags:
- jaxb
- javax
- jakarta
preconditions:
# IBM-specific exclusion
- org.openrewrite.FindSourceFiles:
filePattern: "!(ibm-*)"
recipeList:
- org.openrewrite.xml.ChangeTagAttribute:
#language=xpath
elementName: "//*[namespace-uri() = 'http://java.sun.com/xml/ns/jaxb' and local-name() = 'bindings']"
attributeName: version
oldValue: 1.0
newValue: 3.0
# Update namespace first
- org.openrewrite.xml.ChangeTagAttribute:
#language=xpath
elementName: "//*[namespace-uri() = 'http://java.sun.com/xml/ns/jaxb' and local-name() = 'bindings']"
attributeName: xmlns:jxb
oldValue: http://java.sun.com/xml/ns/jaxb
newValue: https://jakarta.ee/xml/ns/jaxb
# Update version
- org.openrewrite.xml.ChangeTagAttribute:
#language=xpath
elementName: "//*[namespace-uri() = 'https://jakarta.ee/xml/ns/jaxb' and local-name() = 'bindings']"
attributeName: version
oldValue: 1.0
newValue: 3.0
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.jakarta.JavaxXmlSoapToJakartaXmlSoap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.openrewrite.java.migrate.jakarta;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.openrewrite.test.RecipeSpec;
Expand Down Expand Up @@ -45,9 +44,25 @@ void noMigrate() {
);
}

@Test
void noMigrateIBMFiles() {
rewriteRun(
//language=xml
xml(
"""
<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
</jxb:bindings>
""",
spec -> spec.path("ibm-web-ext.xml")
)
);
}

@Nested
class Migrate {
@Disabled // temporarily disabling this to make the project build as we need a release.
@Test
void version() {
rewriteRun(
Expand Down