diff --git a/src/main/resources/META-INF/rewrite/spring-boot-26.yml b/src/main/resources/META-INF/rewrite/spring-boot-26.yml index 019e3b83e..5ac80a1ad 100644 --- a/src/main/resources/META-INF/rewrite/spring-boot-26.yml +++ b/src/main/resources/META-INF/rewrite/spring-boot-26.yml @@ -42,6 +42,15 @@ recipeList: - org.openrewrite.gradle.plugins.UpgradePluginVersion: pluginIdPattern: org.springframework.boot newVersion: 2.6.x + + # From 2.6 onwards the managed dependency is com.mysql:mysql-connector-j:8.0.33 + - org.openrewrite.java.dependencies.ChangeDependency: + oldGroupId: mysql + newGroupId: com.mysql + oldArtifactId: mysql-connector-java + newArtifactId: mysql-connector-j + newVersion: 8.0.x + # Update properties - org.openrewrite.java.spring.boot2.SpringBootProperties_2_6 diff --git a/src/main/resources/META-INF/rewrite/spring-boot-27.yml b/src/main/resources/META-INF/rewrite/spring-boot-27.yml index 59e715b16..ce10132ea 100644 --- a/src/main/resources/META-INF/rewrite/spring-boot-27.yml +++ b/src/main/resources/META-INF/rewrite/spring-boot-27.yml @@ -28,14 +28,10 @@ recipeList: artifactId: "*" newVersion: 2.7.x overrideManagedVersion: false - retainVersions: - - mysql:mysql-connector-java - org.openrewrite.maven.UpgradeParentVersion: groupId: org.springframework.boot artifactId: spring-boot-starter-parent newVersion: 2.7.x - retainVersions: - - mysql:mysql-connector-java - org.openrewrite.gradle.plugins.UpgradePluginVersion: pluginIdPattern: org.springframework.boot newVersion: 2.7.x @@ -54,13 +50,6 @@ recipeList: oldFullyQualifiedTypeName: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy newFullyQualifiedTypeName: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy - org.openrewrite.java.spring.boot2.SpringBootProperties_2_7 - # Switch MySQL driver artifactId - - org.openrewrite.java.dependencies.ChangeDependency: - oldGroupId: mysql - oldArtifactId: mysql-connector-java - newGroupId: com.mysql - newArtifactId: mysql-connector-j - newVersion: 8.0.x # Change: spring.security.saml2.relyingparty.registration.{id}.identityprovider To: spring.security.saml2.relyingparty.registration.{id}.assertingparty - org.openrewrite.java.spring.boot2.SamlRelyingPartyPropertyApplicationPropertiesMove # Property files. - org.openrewrite.yaml.ChangeKey: # Yaml files diff --git a/src/testWithSpringBoot_2_7/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java b/src/testWithSpringBoot_2_7/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java index f36e0f2ec..b8387dd09 100644 --- a/src/testWithSpringBoot_2_7/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java +++ b/src/testWithSpringBoot_2_7/java/org/openrewrite/java/spring/boot2/UpdateMysqlDriverArtifactIdTest.java @@ -32,7 +32,7 @@ import static org.openrewrite.maven.Assertions.pomXml; @Issue("https://github.com/openrewrite/rewrite-spring/issues/274") -public class UpdateMysqlDriverArtifactIdTest implements RewriteTest { +class UpdateMysqlDriverArtifactIdTest implements RewriteTest { @Override public void defaults(RecipeSpec spec) {