Update projects to the latest Quarkus version
You can update or upgrade your Quarkus projects to the latest version of Quarkus by using an update command.
The update command primarily employs OpenRewrite recipes to automate updates for most project dependencies, source code, and documentation. Although these recipes update many migration items, they do not cover all the items detailed in the Migration Guides.
Post-update, if expected updates are missing, consider the following reasons:
-
The recipe might not include a specific item in your project.
-
Your project might use an extension that is incompatible with the latest Quarkus version.
-
If you have Gradle Kotlin build files (
.kts
), Quarkus Update will fail until OpenRewrite supports these.
For projects that use Hibernate ORM or Hibernate Reactive, review the Hibernate ORM 5 to 6 migration quick reference. The following update command covers only a subset of this guide. |
先决条件
完成这个指南,你需要:
-
大概30 minutes
-
编辑器
-
JDK 17+ installed with
JAVA_HOME
configured appropriately -
Apache Maven 3.9.9
-
如果你愿意的话,还可以选择使用Quarkus CLI
-
如果你想构建原生可执行程序,可以选择安装Mandrel或者GraalVM,并正确配置(或者使用Docker在容器中进行构建)
-
A project based on Quarkus version 2.13 or later.
Procedure
-
Create a working branch for your project by using your version control system.
-
To use the Quarkus CLI in the next step, install the latest version of the Quarkus CLI. Confirm the version number using
quarkus -v
. -
Go to the project directory and update the project to the latest stream:
-
Analyze the update command output for potential instructions and perform the suggested tasks if necessary.
-
Use a diff tool to inspect all changes.
-
Review the Migration Guides for items that were not updated by the update command. If your project has such items, implement the additional steps advised in these topics.
-
Ensure the project builds without errors, all tests pass, and the application functions as required before deploying to production.