Skip to content

Commit 02d29d8

Browse files
committed
Do not intermix java-ee/jakarta migration with java migration, if anything they should be composed together
1 parent 8cd830c commit 02d29d8

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

src/main/resources/META-INF/rewrite/add-common-annotations-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ recipeList:
3333
newGroupId: jakarta.annotation
3434
newArtifactId: jakarta.annotation-api
3535
newVersion: 1.3.x
36-
# set explicitly even if managed, as higher versions do not have the javax namespace
36+
# Set explicitly even if managed, as higher versions do not have the javax namespace
3737
overrideManagedVersion: true
3838
changeManagedDependency: false
3939
# Jakarta EE recommends `provided` scope

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ recipeList:
7272
artifactId: mapstruct*
7373
newVersion: 1.6.x
7474
- org.openrewrite.java.migrate.AddLombokMapstructBinding
75-
- org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfForJavax
76-
- org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfExistsForJakarta
7775

7876
---
7977
type: specs.openrewrite.org/v1beta/recipe
@@ -338,28 +336,4 @@ recipeList:
338336
groupId: org.projectlombok
339337
artifactId: lombok-mapstruct-binding
340338
version: 0.2.0
341-
---
342-
# The scanning phase comes before the editing phase, therefor we check if a javax.annotation dependency is on the classpath (with whatever version)
343-
type: specs.openrewrite.org/v1beta/recipe
344-
name: org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfForJavax
345-
displayName: Update `jakarta.annotation-api` dependency if it exists
346-
description: Counteract the `jakarta.annotation-api` by updating to `jakarta` namespace
347-
preconditions:
348-
- org.openrewrite.java.dependencies.search.ModuleHasDependency:
349-
groupIdPattern: javax.annotation
350-
artifactIdPattern: javax.annotation-api
351-
recipeList:
352-
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
353339

354-
---
355-
type: specs.openrewrite.org/v1beta/recipe
356-
name: org.openrewrite.java.migrate.UpdateJakartaAnnotationsIfExistsForJakarta
357-
displayName: Update `jakarta.annotation-api` dependency if it exists
358-
description: Counteract the `jakarta.annotation-api` by updating to `jakarta` namespace
359-
preconditions:
360-
- org.openrewrite.java.dependencies.search.ModuleHasDependency:
361-
groupIdPattern: jakarta.annotation
362-
artifactIdPattern: jakarta.annotation-api
363-
version: 1.3.x
364-
recipeList:
365-
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation

0 commit comments

Comments
 (0)