Migrate JavaEE Maven Dependencies to Quarkus 2
Recipe ID
org.openrewrite.quarkus.migrate.javaee.AddQuarkus2MavenPluginsArtifactorg.openrewrite.recipe:rewrite-quarkusUpgrade Standard JavaEE dependencies to Quarkus 2 dependencies.
Composite recipeApache 2.0
Add to your build
Get a download tokenSign in with GitHub or Google, and your token replaces YOUR_DOWNLOAD_TOKEN below. Free for open source recipes like this one.
~/.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.quarkus.migrate.javaee.AddQuarkus2MavenPlugins")
}
repositories {
mavenCentral()
maven {
url = uri("https://artifacts.codegenomeproject.org/maven")
credentials {
username = providers.gradleProperty("codeGenomeUsername").get()
password = providers.gradleProperty("codeGenomeToken").get()
}
}
}
dependencies {
rewrite("org.openrewrite.recipe:rewrite-quarkus:2.36.1")
}
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.quarkus.migrate.javaee.AddQuarkus2MavenPluginsIf the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite.recipe:rewrite-quarkus:RELEASEDefinition
This recipe runs the following recipes in order.
- Add managed Maven dependency
io.quarkus.platform:quarkus-bom:2.xorg.openrewrite.maven.AddManagedDependency - Add Maven plugin
io.quarkus.platform:quarkus-maven-plugin:2.16.12.Finalorg.openrewrite.maven.AddPlugin - Add Maven plugin
org.apache.maven.plugins:maven-compiler-plugin:3.13.0org.openrewrite.maven.AddPlugin - Add Maven plugin
org.apache.maven.plugins:maven-surefire-plugin:3.3.1org.openrewrite.maven.AddPlugin - Add Maven plugin
org.apache.maven.plugins:maven-failsafe-plugin:3.3.1org.openrewrite.maven.AddPlugin - Add Maven profile
nativeorg.openrewrite.maven.AddProfile - Configure
quarkus-maven-pluginwith reasonable defaultsorg.openrewrite.quarkus.ConfigureQuarkusMavenPluginWithReasonableDefaults - Apache Maven best practices
org.openrewrite.maven.BestPractices - Add Maven project property
maven.compiler.source=11org.openrewrite.maven.AddProperty - Add Maven project property
maven.compiler.target=11org.openrewrite.maven.AddProperty - Set Maven project packaging for
*:*tojarorg.openrewrite.maven.ChangePackaging - Remove Maven plugin
org.apache.maven.plugins:maven-war-pluginorg.openrewrite.maven.RemovePlugin
Data tables
Structured output this recipe can produce.
- Maven metadata failuresAttempts to resolve maven metadata that failed.
org.openrewrite.maven.table.MavenMetadataFailures - 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