diff --git a/src/main/resources/META-INF/rewrite/struts.yml b/src/main/resources/META-INF/rewrite/struts6.yml similarity index 87% rename from src/main/resources/META-INF/rewrite/struts.yml rename to src/main/resources/META-INF/rewrite/struts6.yml index 4cbd896..60ef9ea 100644 --- a/src/main/resources/META-INF/rewrite/struts.yml +++ b/src/main/resources/META-INF/rewrite/struts6.yml @@ -14,18 +14,25 @@ # limitations under the License. # --- +type: specs.openrewrite.org/v1beta/category +name: Struts 6.0 +packageName: org.openrewrite.java.struts.migrate6 +description: Migrate to Struts 6.0. The full migration guide can be found [here](https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration#Struts2.5to6.0.0migration-Staticmethodsaccess). +--- type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.struts.MigrateStruts6 -displayName: Migrate to Struts 6 -description: Migrate Struts 2 to Struts 6 +name: org.openrewrite.java.struts.migrate6.MigrateStruts6 +displayName: Migrate to Struts 6.0 +description: Migrate Struts 2.x to Struts 6.0 recipeList: - - org.openrewrite.java.struts.MigrateAwareInterfaces - - org.openrewrite.java.struts.UpgradeStruts6Dependencies + - org.openrewrite.java.struts.migrate6.MigrateAwareInterfaces + - org.openrewrite.java.struts.migrate6.UpgradeStruts6Dependencies + - org.openrewrite.java.struts.MigrateStrutsDtd: + strutsVersion: 6.0 --- type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.struts.UpgradeStruts6Dependencies -displayName: Upgrade Struts 6 dependencies -description: Upgrade Struts 2 dependencies to Struts 6 +name: org.openrewrite.java.struts.migrate6.UpgradeStruts6Dependencies +displayName: Upgrade Struts 6.0 dependencies +description: Upgrade Struts 2.x dependencies to Struts 6.0 recipeList: - org.openrewrite.maven.upgrade.UpgradeDependencyVersion: groupId: org.apache.struts @@ -33,8 +40,8 @@ recipeList: newVersion: 6.x --- type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.struts.MigrateStruts6Constants -displayName: Migrate to Struts 6 constants +name: org.openrewrite.java.struts.migrate6.MigrateStruts6Constants +displayName: Migrate to Struts 6.0 constants description: All Xwork constants had been already deprecated, with this version all of them have been removed and Struts constants have been used instead. preconditions: - org.openrewrite.java.struts.search.FindStrutsXml @@ -157,9 +164,9 @@ recipeList: # xwork.loggerFactory --- type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.struts.MigrateAwareInterfaces -displayName: Migrate Struts 2 interceptors to action "aware" interfaces -description: These types have moved to a new package in Struts 6. +name: org.openrewrite.java.struts.migrate6.MigrateAwareInterfaces +displayName: Migrate Struts 2.0 interceptors to action "aware" interfaces +description: These types have moved to a new package in Struts 6.0. recipeList: - org.openrewrite.java.ChangeType: oldFullyQualifiedTypeName: org.apache.struts2.interceptor.ApplicationAware diff --git a/src/test/java/org/openrewrite/java/struts/MigrateStruts6ConstantsTest.java b/src/test/java/org/openrewrite/java/struts/MigrateStruts6ConstantsTest.java index c0a4ab7..6bdf66c 100644 --- a/src/test/java/org/openrewrite/java/struts/MigrateStruts6ConstantsTest.java +++ b/src/test/java/org/openrewrite/java/struts/MigrateStruts6ConstantsTest.java @@ -31,7 +31,7 @@ public void defaults(RecipeSpec spec) { spec.recipe(Environment.builder() .scanYamlResources() .build() - .activateRecipes("org.openrewrite.java.struts.MigrateStruts6Constants")) + .activateRecipes("org.openrewrite.java.struts.migrate6.MigrateStruts6Constants")) .expectedCyclesThatMakeChanges(1).cycles(1); }