diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index b16c5f3dd884b..5d88b7515ebfe 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -5743,6 +5743,40 @@
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.maven.javax.managed
+ io.quarkus.maven.javax.versions
+ io.quarkus.jakarta-versions
+ io.quarkus.jakarta-jaxrs-jaxb
+ io.quarkus.jakarta-security
+ io.quarkus.smallrye
+
+
+
+
+
+
+ rewrite-cleanup
+
+
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.jakarta-jaxrs-jaxb-cleanup
+ io.quarkus.jakarta-security-cleanup
+
+
+
+
+
+
+
diff --git a/core/launcher/pom.xml b/core/launcher/pom.xml
index dad544a5ec63c..72c41caefcddd 100644
--- a/core/launcher/pom.xml
+++ b/core/launcher/pom.xml
@@ -35,7 +35,7 @@
unpack-dependencies
- process-classes
+ prepare-package
unpack-dependencies
diff --git a/extensions/arc/deployment/pom.xml b/extensions/arc/deployment/pom.xml
index 954e712e52ae3..415a447ba3b90 100644
--- a/extensions/arc/deployment/pom.xml
+++ b/extensions/arc/deployment/pom.xml
@@ -64,6 +64,15 @@
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.extensions.arc
+
+
+
diff --git a/extensions/reactive-routes/deployment/pom.xml b/extensions/reactive-routes/deployment/pom.xml
index 8cbfb0878fc99..4177dcd50cf4f 100644
--- a/extensions/reactive-routes/deployment/pom.xml
+++ b/extensions/reactive-routes/deployment/pom.xml
@@ -34,6 +34,11 @@
quarkus-hibernate-validator-spi
+
+ io.quarkus
+ quarkus-jsonp-deployment
+ test
+
io.quarkus
quarkus-security-deployment
diff --git a/independent-projects/arc/pom.xml b/independent-projects/arc/pom.xml
index 05f841b6eb804..054cf98d31143 100644
--- a/independent-projects/arc/pom.xml
+++ b/independent-projects/arc/pom.xml
@@ -300,8 +300,28 @@
${format.skip}
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+ false
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.jakarta-versions
+
+
+
+
diff --git a/independent-projects/bootstrap/bom/pom.xml b/independent-projects/bootstrap/bom/pom.xml
index 0229407f6482e..b6e615acbb1da 100644
--- a/independent-projects/bootstrap/bom/pom.xml
+++ b/independent-projects/bootstrap/bom/pom.xml
@@ -353,4 +353,18 @@
+
+
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.maven.javax.allow
+ io.quarkus.maven.javax.managed
+
+
+
+
+
diff --git a/independent-projects/bootstrap/pom.xml b/independent-projects/bootstrap/pom.xml
index b30ecd7564e2d..778c20f622c88 100644
--- a/independent-projects/bootstrap/pom.xml
+++ b/independent-projects/bootstrap/pom.xml
@@ -220,8 +220,32 @@
${format.skip}
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
+
+
+ false
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.jakarta-versions
+ io.quarkus.maven.javax.versions
+
+
+
+
diff --git a/independent-projects/enforcer-rules/pom.xml b/independent-projects/enforcer-rules/pom.xml
index ba8e40eaf92a2..5ee2f1a502e0f 100644
--- a/independent-projects/enforcer-rules/pom.xml
+++ b/independent-projects/enforcer-rules/pom.xml
@@ -72,6 +72,21 @@
+
+
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
+
+
maven-invoker-plugin
diff --git a/independent-projects/ide-config/pom.xml b/independent-projects/ide-config/pom.xml
index 91d76a990b33c..60b010fa20eeb 100644
--- a/independent-projects/ide-config/pom.xml
+++ b/independent-projects/ide-config/pom.xml
@@ -64,6 +64,17 @@
${jacoco.agent.argLine}
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
diff --git a/independent-projects/qute/pom.xml b/independent-projects/qute/pom.xml
index 3f9e4425b31e4..79b8ed89242d6 100644
--- a/independent-projects/qute/pom.xml
+++ b/independent-projects/qute/pom.xml
@@ -234,6 +234,17 @@
${format.skip}
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
diff --git a/independent-projects/resteasy-reactive/pom.xml b/independent-projects/resteasy-reactive/pom.xml
index 60dc9e02ac589..c7b7d9b0082ab 100644
--- a/independent-projects/resteasy-reactive/pom.xml
+++ b/independent-projects/resteasy-reactive/pom.xml
@@ -481,8 +481,32 @@
${format.skip}
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
+
+
+ false
+ org.openrewrite.maven
+ rewrite-maven-plugin
+
+
+ io.quarkus.jakarta-versions
+ io.quarkus.jakarta-jaxrs-jaxb
+
+
+
+
diff --git a/independent-projects/revapi/pom.xml b/independent-projects/revapi/pom.xml
index 6f07560044ef6..81e35f11c0f9e 100644
--- a/independent-projects/revapi/pom.xml
+++ b/independent-projects/revapi/pom.xml
@@ -35,6 +35,21 @@
+
+
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
+
+
@g" $1/pom.xml
+}
+
+# Update a banned dependency
+update_banned_dependency () {
+ sed -i "s@$2@$3@g" $1/pom.xml
+}
+
+update_banned_dependency_advanced () {
+ sed -i "s@$2@$3@g" $1/pom.xml
}
# Build, test and install a particular maven module (chosen by relative path)
build_module () {
- local pomPath="$quarkusPath/$1/pom.xml"
+ local pomPath="$1/pom.xml"
./mvnw -B clean install -f "$pomPath"
- echo "Installed newly built $pomPath"
+ echo " - Installed newly built $pomPath"
+}
+
+# Build module without testing it
+build_module_no_tests () {
+ local pomPath="$1/pom.xml"
+ ./mvnw -B clean install -f "$pomPath" -DskipTests -DskipITs
+ echo " - Installed newly built $pomPath"
+}
+
+build_module_only_no_tests () {
+ local pomPath="$1/pom.xml"
+ ./mvnw -B clean install -f "$pomPath" -DskipTests -DskipITs -N
+ echo " - Installed newly built $pomPath"
}
# Sets the EDITING variable to the file being edited by set_property
edit_begin () {
- EDITING="$quarkusPath/$1"
+ EDITING="$1"
}
# Finds a particular property and replaces its value
@@ -50,34 +141,110 @@ set_property () {
sed -i "s/<$propName>.*<\/$propName>/<$propName>$propValue<\/$propName>/g" "$EDITING"
}
-# Arc project transformation
-transform_module "independent-projects/arc"
+###############################
+###############################
+
+# OpenRewrite phase - we rewrite the whole repository in one go
+clean_maven_repository
+clean_project
+
+## let's build what's required to be able to run the rewrite
+./mvnw -pl :quarkus-platform-descriptor-json-plugin -pl :quarkus-bootstrap-maven-plugin -pl :quarkus-enforcer-rules -am clean install -DskipTests -DskipITs
+
+## we cannot rewrite some of the modules for various reasons but we rewrite most of them
+./mvnw rewrite:run -Denforcer.skip -Dprotoc.skip -Dmaven.main.skip -Dmaven.test.skip -Dforbiddenapis.skip -pl '!:quarkus-bom-quarkus-platform-descriptor' -pl '!:io.quarkus.gradle.plugin' -pl '!:io.quarkus.extension.gradle.plugin' -pl '!:quarkus-cli' -pl '!:quarkus-documentation' -Dno-test-modules -Drewrite.pomCacheEnabled=false
+
+## remove banned dependencies
+remove_banned_dependency "independent-projects/bootstrap" 'javax.inject:javax.inject' 'we allow javax.inject for Maven'
+remove_banned_dependency "independent-projects/bootstrap" 'javax.annotation:javax.annotation-api' 'we allow javax.annotation-api for Maven'
+remove_banned_dependency "independent-projects/tools" 'javax.inject:javax.inject' 'we allow javax.inject for Maven'
+remove_banned_dependency "independent-projects/tools" 'javax.annotation:javax.annotation-api' 'we allow javax.annotation-api for Maven'
+remove_banned_dependency "build-parent" 'javax.inject:javax.inject' 'we allow javax.inject for Maven'
+remove_banned_dependency "build-parent" 'javax.annotation:javax.annotation-api' 'we allow javax.annotation-api for Maven'
+update_banned_dependency "build-parent" 'jakarta.xml.bind:jakarta.xml.bind-api' 'org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec'
+update_banned_dependency_advanced "build-parent" 'jakarta.ws.rs:jakarta.ws.rs-api' "jakarta.ws.rs:jakarta.ws.rs-api\n org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec"
-# Now we need to update CDI, JTA, JPA and common annotations artifacts
-edit_begin "independent-projects/arc/pom.xml"
-set_property "version.cdi" "3.0.0"
-set_property "version.jta" "2.0.0"
-set_property "version.jakarta-annotation" "2.0.0"
-set_property "version.jpa" "3.0.0"
+## cleanup phase - needs to be done once everything has been rewritten
+rewrite_module_cleanup "bom/application"
-# Test & install modified Arc
+## we get rid of everything that has been built previously, we want to start clean
+clean_maven_repository
+
+# Tranformation phase
+
+## Install root parent
+./mvnw clean install -N
+
+## Install utility projects
+build_module_no_tests "independent-projects/ide-config"
+build_module_no_tests "independent-projects/enforcer-rules"
+build_module_no_tests "independent-projects/revapi"
+
+## ArC
+start_module "ArC"
+transform_module "independent-projects/arc"
build_module "independent-projects/arc"
-# Switch parent BOM to Jakarta artifacts
-edit_begin "bom/application/pom.xml"
-set_property "jakarta.inject-api.version" "2.0.0"
-set_property "jakarta.interceptor-api.version" "2.0.0"
-set_property "jakarta.transaction-api.version" "2.0.0"
-set_property "jakarta.enterprise.cdi-api.version" "3.0.0"
-set_property "jakarta.annotation-api.version" "2.0.0"
-set_property "jakarta.persistence-api.version" "3.0.0"
+## Bootstrap
+start_module "Bootstrap"
+build_module "independent-projects/bootstrap"
-# Install the modified BOM:
-build_module "bom/application"
+## Qute
+start_module "Qute"
+build_module_no_tests "independent-projects/qute"
-## Arc Extension [Incomplete: other modules need to go first]
+## Tools
+start_module "Tools"
+build_module "independent-projects/tools"
+
+# BOM
+start_module "BOM"
+build_module "bom/application"
+build_module "bom/test"
+
+# Build parent
+start_module "Build parent"
+build_module "build-parent"
+
+# Core
+start_module "Core"
+
+## Needed for core
+build_module_only_no_tests devtools
+build_module_no_tests "devtools/platform-descriptor-json-plugin"
+build_module_no_tests "devtools/platform-properties"
+
+## Core
+transform_module "core"
+build_module_no_tests "core"
+
+# Test framework
+start_module "Test framework"
+transform_module "test-framework"
+build_module_only_no_tests "test-framework"
+build_module "test-framework/common"
+build_module "test-framework/devmode-test-utils"
+build_module "test-framework/junit5-properties"
+build_module "test-framework/junit5"
+build_module "test-framework/junit5-internal"
+build_module "test-framework/maven"
+
+# Extensions
+start_module "Extensions"
+transform_module "extensions"
+build_module_only_no_tests "extensions"
+build_module_only_no_tests "extensions/vertx-http"
+build_module "extensions/vertx-http/dev-console-runtime-spi"
+build_module "extensions/vertx-http/dev-console-spi"
+build_module "extensions/arc"
+
+exit 1
+
+# These ones require ArC and Mutiny extensions
+#build_module "test-framework/junit5-mockito-config"
+#build_module "test-framework/junit5-mockito"
+
+# Dev Tools - needs to be done after all the extensions have been built and before we run the ITs
+#transform_module "devtools"
+#build_module_no_tests "devtools"
-# transform_module "extensions/arc/runtime"
-# transform_module "extensions/arc/deployment"
-# build_module "extensions/arc/runtime"
-# build_module "extensions/arc/deployment"
diff --git a/pom.xml b/pom.xml
index 2405e6b442062..72b2e6cc22f08 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,6 +143,17 @@
quarkus-platform-bom-maven-plugin
${quarkus-platform-bom-plugin.version}
+
+ org.openrewrite.maven
+ rewrite-maven-plugin
+ 4.21.0-SNAPSHOT
+
+ ${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml
+
+
+
+
+
diff --git a/test-framework/common/pom.xml b/test-framework/common/pom.xml
index f88c88f89a4c3..f4c2e5ee101f1 100644
--- a/test-framework/common/pom.xml
+++ b/test-framework/common/pom.xml
@@ -18,10 +18,6 @@
io.quarkus
quarkus-core-deployment
-
- io.quarkus
- quarkus-jsonp-deployment
-
org.jboss
jandex