From 3db5bf155e3b79ed0cd24ff8616cf19d08c8c76b Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 25 Apr 2024 15:27:33 +0200 Subject: [PATCH] Update Quarkus 3 upgrade blog Apparently, it's very well referenced as people are finding it when trying to upgrade to Quarkus 3 so let's make sure the info is relevant (even if not historically correct). --- _posts/2023-05-20-quarkus-3-upgrade.adoc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/_posts/2023-05-20-quarkus-3-upgrade.adoc b/_posts/2023-05-20-quarkus-3-upgrade.adoc index 55b2368fd2a..18979a516a4 100644 --- a/_posts/2023-05-20-quarkus-3-upgrade.adoc +++ b/_posts/2023-05-20-quarkus-3-upgrade.adoc @@ -20,10 +20,20 @@ Furthermore, if there's an explicit Jakarta API dependency in the project, you'l Of course, you can migrate the application manually. But since Quarkus embraces the developer joy there is the Quarkus Update Tool to the rescue! +[TIP] +==== +This blog post was written just after the Quarkus 3.0 release. +Things have evolved a bit since then. + +For more information about how to update to the latest Quarkus, have a look at the https://quarkus.io/guides/update-quarkus[dedicated guide]. + +You can also find all the migration guides in https://github.com/quarkusio/quarkus/wiki/Migration-Guides[our wiki]. +==== + == Quarkus Update Tool - TL;DR -. Install the https://quarkus.io/guides/cli-tooling[Quarkus CLI] or make sure a 3+ version is installed -. Run `quarkus update --stream=3.0` +. Install the https://quarkus.io/guides/cli-tooling[Quarkus CLI] or make sure the latest version is installed +. Run `quarkus update` . Check the changes made by the tool . Profit! @@ -52,19 +62,19 @@ To run the update: [source,role="primary asciidoc-tabs-target-sync-cli"] .CLI ---- -quarkus update --stream=3.0 +quarkus update ---- [source,role="secondary asciidoc-tabs-target-sync-maven"] .Maven ---- -./mvnw io.quarkus.platform:quarkus-maven-plugin:3.0.3.Final:update -N -Dstream=3.0 +./mvnw io.quarkus.platform:quarkus-maven-plugin:3.9.3.Final:update -N ---- [source,role="secondary asciidoc-tabs-target-sync-gradle"] .Gradle ---- -./gradlew -PquarkusPluginVersion=3.0.3.Final quarkusUpdate --stream=3.0 +./gradlew -PquarkusPluginVersion=3.9.3.Final quarkusUpdate ---- IMPORTANT: If using https://quarkus.io/guides/cli-tooling[Quarkus CLI] then always make sure the latest version is used. The `quarkus version` command should output version 3+. @@ -72,7 +82,7 @@ IMPORTANT: If using https://quarkus.io/guides/cli-tooling[Quarkus CLI] then alwa Keep in mind that there is no dry-run mode. In other words, once you trigger the update, the changes will be immediately written to the file system. However, you can leverage the source code management tool to see the transformations applied. -For example, if using Git then run the update tool and execute the `git diff` command afterwards to see the changes. +For example, if using Git then run the update tool and execute the `git diff` command afterwards to see the changes. And if something went wrong then just use `git checkout .` to revert the changes. TIP: If your application depends on Hibernate ORM, the dedicated https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.0:-Hibernate-ORM-5-to-6-migration[Hibernate ORM 5 to 6] migration guide will come in handy.