@@ -48,12 +48,7 @@ description: >-
4848preconditions :
4949 - org.openrewrite.Singleton
5050recipeList :
51- # Step 1: Handle jakarta-suffixed artifacts individually (they need artifact renaming).
52- # Note: all scanners run in a single phase before any editors, so the glob scanner in
53- # step 3 still sees these at org.hibernate in its scan. However, the glob's editor runs
54- # after these editors, so it won't double-change them. The glob scanner matching these
55- # is harmless: canUpdateVariable still passes since hibernate-* matches them, and in
56- # practice jakarta and non-jakarta variants don't share version variables.
51+ # Jakarta-suffixed artifacts need artifact renaming
5752 - org.openrewrite.java.dependencies.ChangeDependency :
5853 oldGroupId : org.hibernate
5954 oldArtifactId : hibernate-agroal-jakarta
@@ -132,26 +127,20 @@ recipeList:
132127 newGroupId : org.hibernate.orm
133128 newArtifactId : hibernate-testing
134129 newVersion : 6.0.x
135- # Step 2: Remove hibernate-entitymanager before the glob matches it.
136- # This artifact was removed in Hibernate 6 (merged into hibernate-core).
130+ # Remove hibernate-entitymanager before the glob matches it
137131 - org.openrewrite.java.dependencies.RemoveDependency :
138132 groupId : org.hibernate
139133 artifactId : hibernate-entitymanager
140134 - org.openrewrite.maven.RemoveManagedDependency :
141135 groupId : org.hibernate
142136 artifactId : hibernate-entitymanager
143- # Step 3: Migrate all remaining org.hibernate:hibernate-* to org.hibernate.orm in a single
144- # ChangeDependency. Using a single recipe means that ChangeDependency's canUpdateVariable
145- # check sees all matching dependencies at once, so shared ext properties (e.g. hibernateVersion)
146- # are updated in place rather than being detached from some dependencies.
137+ # Single glob for all remaining ORM artifacts — preserves shared version properties
147138 - org.openrewrite.java.dependencies.ChangeDependency :
148139 oldGroupId : org.hibernate
149140 oldArtifactId : hibernate-*
150141 newGroupId : org.hibernate.orm
151142 newVersion : 6.0.x
152- # Step 4: Revert non-ORM artifacts that the glob inadvertently matched.
153- # hibernate-validator and hibernate-search are separate projects that did not move to
154- # org.hibernate.orm. These entries restore the original groupId without changing the version.
143+ # Revert non-ORM artifacts the glob inadvertently matched
155144 - org.openrewrite.java.dependencies.ChangeDependency :
156145 oldGroupId : org.hibernate.orm
157146 oldArtifactId : hibernate-validator
0 commit comments