Migrate Tapestry 4 to Tapestry 5
Recipe ID
org.openrewrite.tapestry.MigrateTapestry4To5Artifactio.moderne.recipe:rewrite-tapestryMigrates Apache Tapestry 4 applications to Tapestry 5. This includes package renames, removing base class inheritance, converting listener interfaces to annotations, and updating dependencies.
Composite recipemigrationtapestryProprietary
Add to your build
Get a download tokenThis recipe is Moderne licensed, so the token must belong to a Moderne customer. It replaces YOUR_DOWNLOAD_TOKEN below.
~/.gradle/gradle.properties
codeGenomeUsername=you@example.com
codeGenomeToken=YOUR_DOWNLOAD_TOKEN
build.gradle.kts
plugins {
id("org.openrewrite.rewrite") version("latest.release")
}
rewrite {
activeRecipe("org.openrewrite.tapestry.MigrateTapestry4To5")
}
repositories {
mavenCentral()
maven {
url = uri("https://artifacts.codegenomeproject.org/maven")
credentials {
username = providers.gradleProperty("codeGenomeUsername").get()
password = providers.gradleProperty("codeGenomeToken").get()
}
}
}
dependencies {
rewrite("io.moderne.recipe:rewrite-tapestry:0.7.0")
}
Then run
./gradlew rewriteRunUsage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.tapestry.MigrateTapestry4To5If the recipe isn’t available locally, install it with:
mod config recipes jar install io.moderne.recipe:rewrite-tapestry:RELEASEDefinition
This recipe runs the following recipes in order.
- Remove Tapestry 4 base classes
org.openrewrite.tapestry.RemoveTapestryBaseClasses - Convert Tapestry 4 listener interfaces to Tapestry 5 annotations
org.openrewrite.tapestry.ConvertListenerInterfaces - Remove
IRequestCycleparametersorg.openrewrite.tapestry.RemoveIRequestCycleParameter - Convert annotated abstract method to field
org.openrewrite.tapestry.ConvertAnnotatedMethodToField - Convert annotated abstract method to field
org.openrewrite.tapestry.ConvertAnnotatedMethodToField - Convert Tapestry 4
@Beanto@Propertyorg.openrewrite.tapestry.ConvertBeanAnnotation - Convert annotated abstract method to field
org.openrewrite.tapestry.ConvertAnnotatedMethodToField - Convert annotated abstract method to field
org.openrewrite.tapestry.ConvertAnnotatedMethodToField - Convert annotated abstract method to field
org.openrewrite.tapestry.ConvertAnnotatedMethodToField - Change Tapestry 4 types to Tapestry 5 equivalents
org.openrewrite.tapestry.ChangeTapestryTypes - Remove annotation
@org.apache.tapestry.annotations.InitialValueorg.openrewrite.java.RemoveAnnotation - Change Tapestry 4 packages to Tapestry 5
org.openrewrite.tapestry.ChangeTapestryPackages - Remove annotation
@org.apache.tapestry.annotations.ComponentClassorg.openrewrite.java.RemoveAnnotation - Remove annotation
@org.apache.tapestry5.annotations.ComponentClassorg.openrewrite.java.RemoveAnnotation - Replace
ReverseComparatorwithCollections.reverseOrder()org.openrewrite.tapestry.ReplaceReverseComparator - Remove obsolete Tapestry form types
org.openrewrite.tapestry.RemoveObsoleteFormTypes - Update Tapestry dependencies
org.openrewrite.tapestry.UpdateTapestryDependencies
Data tables
Structured output this recipe can produce.
- 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