Skip to content

Commit ee64233

Browse files
authored
JaxB plugin migrations from 2.X to 4.0 (#932)
* add migration for org.jvnet.jaxb:artifactId:jaxb-maven-plugin for JaxB 2 using jakarta dependencies but javax packages * configure the jaxb-maven-plugin correctly. JaxB 3.0, Jakarta EE 9 (jakarta dependencies and namespace) requires plugin 3.X. * enable Plugin migration for JaxB 4.0 for Jakarta EE 10 (org.codehaus.mojo:jaxb2-maven-plugin:4.X and org.jvnet.jaxb:jaxb-maven-plugin:4.X)
1 parent 29e071d commit ee64233

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

src/main/resources/META-INF/rewrite/jakarta-ee-10.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ tags:
2424
recipeList:
2525
- org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
2626
- org.openrewrite.java.migrate.jakarta.MigrationToJakarta10Apis
27+
- org.openrewrite.java.migrate.jakarta.MigratePluginsForJakarta10
2728
- org.openrewrite.java.migrate.jakarta.JettyUpgradeEE10
2829
- org.openrewrite.java.migrate.jakarta.Faces3xMigrationToFaces4x
2930
- org.openrewrite.java.migrate.jakarta.RemovedIsParmetersProvidedMethod
@@ -587,3 +588,16 @@ recipeList:
587588
oldFullyQualifiedTypeName: org.eclipse.jetty.util.resource.ResourceCollection
588589
newFullyQualifiedTypeName: org.eclipse.jetty.util.resource.Resource
589590
---
591+
type: specs.openrewrite.org/v1beta/recipe
592+
name: org.openrewrite.java.migrate.jakarta.MigratePluginsForJakarta10
593+
displayName: Update Plugins for Jakarta EE 10
594+
description: Update plugin to be compatible with Jakarta EE 10.
595+
recipeList:
596+
- org.openrewrite.maven.UpgradePluginVersion:
597+
groupId: org.codehaus.mojo
598+
artifactId: jaxb2-maven-plugin
599+
newVersion: 4.x
600+
- org.openrewrite.maven.UpgradePluginVersion:
601+
groupId: org.jvnet.jaxb
602+
artifactId: jaxb-maven-plugin
603+
newVersion: 4.x

src/main/resources/META-INF/rewrite/jakarta-ee-9.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,9 @@ recipeList:
781781
artifactId: jaxb2-maven-plugin
782782
newVersion: 3.x
783783
- org.openrewrite.maven.UpgradePluginVersion:
784-
groupId: org.codehaus.mojo
784+
groupId: org.jvnet.jaxb
785785
artifactId: jaxb-maven-plugin
786-
newVersion: 4.x
786+
newVersion: 3.x
787787
- org.openrewrite.java.migrate.jakarta.JavaxXmlToJakartaXmlXJCBinding
788788
---
789789
type: specs.openrewrite.org/v1beta/recipe

src/main/resources/META-INF/rewrite/java-version-11.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ recipeList:
109109
groupId: org.codehaus.mojo
110110
artifactId: jaxb2-maven-plugin
111111
newVersion: 2.5.x
112+
- org.openrewrite.maven.UpgradePluginVersion:
113+
groupId: org.jvnet.jaxb
114+
artifactId: jaxb-maven-plugin
115+
newVersion: 2.0.X
112116
---
113117
type: specs.openrewrite.org/v1beta/recipe
114118
name: org.openrewrite.java.migrate.javax.AddJaxwsDependencies

0 commit comments

Comments
 (0)