Adopt latest OR release. Boot -> 3.3.1

This commit is contained in:
aboyko
2024-07-04 00:13:00 -04:00
parent c9656f5c36
commit 69785f1744
4 changed files with 33 additions and 105 deletions

View File

@@ -169,13 +169,7 @@ public class RewriteRecipeRepository {
if (recipes.containsKey(r.getName())) {
log.error("Duplicate ids: '" + r.getName() + "'");
}
recipes.put(r.getName(), r);
// HACK: add Jakarta XML Bind migration recipe again as there are cases when maven dependency isn't added
if (r.getName().startsWith("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_")) {
AddDependency addDepXmlBindDep = new AddDependency("jakarta.xml.bind", "jakarta.xml.bind-api", "latest.release", null, null, null, "javax.xml.bind..*", null, null, null, null, false);
r.getDescriptor().getRecipeList().add(addDepXmlBindDep.getDescriptor());
r.getRecipeList().add(addDepXmlBindDep);
}
recipes.put(r.getName(), r);
}
}
log.info("Done loading Rewrite Recipes");

View File

@@ -35,7 +35,7 @@ public class RewriteRecipeRepositoryTest {
@Test
void listSubRecipe() throws Exception {
List<Recipe> recipes = recipeRepo.getSubRecipes("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1", List.of()).get();
assertEquals(8, recipes.size());
assertEquals(7, recipes.size());
recipes = recipeRepo.getSubRecipes("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1", List.of(0, 2)).get();
assertEquals(20, recipes.size());