Migrate to Struts 6.0
Recipe ID
org.openrewrite.java.struts.migrate6.MigrateStruts6Artifact
org.openrewrite.recipe:rewrite-strutsMigrate Struts 2.x to Struts 6.0.
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.java.struts.migrate6.MigrateStruts6If the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite.recipe:rewrite-struts:0.26.4Definition
This recipe runs the following recipes in order.
- Migrate Struts 2.0 interceptors to action "aware" interfaces
org.openrewrite.java.struts.migrate6.MigrateAwareInterfaces - Migrate Dynamic Method Invocation to explicit action mappings
org.openrewrite.java.struts.migrate6.MigrateDynamicMethodInvocation - Migrate OpenSymphony classes to Struts 6.0
org.openrewrite.java.struts.migrate6.MigrateOpenSymphonyClasses - Upgrade Struts 6.0 dependencies
org.openrewrite.java.struts.migrate6.UpgradeStruts6Dependencies - Migrate to Struts 6.0 constants
org.openrewrite.java.struts.migrate6.MigrateStruts6Constants - Migrate Struts date tag format patterns
org.openrewrite.java.struts.migrate6.MigrateDateTagFormat - Remove deprecated Freemarker
?htmlbuilt-inorg.openrewrite.java.struts.migrate6.RemoveFreemarkerHtmlBuiltin - Migrate DTD to a specific Struts version
org.openrewrite.java.struts.MigrateStrutsDtd - Migrate static OGNL method access to action wrapper methods
org.openrewrite.java.struts.migrate6.MigrateStaticOgnlMethodAccess - Migrate
xwork-validatorDTD to 1.0.4org.openrewrite.java.struts.migrate6.MigrateValidatorDtd - Change XML attribute
org.openrewrite.xml.ChangeTagAttribute - Change XML tag value
org.openrewrite.xml.ChangeTagValue
Data tables
Structured output this recipe can produce.
- Static OGNL method accessLocations where OGNL expressions use static method access, which is disabled by default in Struts 6.
org.openrewrite.java.struts.table.StaticOgnlMethodAccess - Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats