Skip to content

Commit

Permalink
Merge pull request #1963 from gsmet/update-martin-blog
Browse files Browse the repository at this point in the history
Update Quarkus 3 upgrade blog
  • Loading branch information
mkouba authored Apr 25, 2024
2 parents cc0c6a1 + 3db5bf1 commit 0e794c7
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions _posts/2023-05-20-quarkus-3-upgrade.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down Expand Up @@ -52,27 +62,27 @@ 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+.

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.
Expand Down

0 comments on commit 0e794c7

Please sign in to comment.