quarkus-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Quarkus Project Check

Quarkus项目检查

Check if a Quarkus project's build files are up-to-date by comparing against reference generated projects from code-with-quarkus-compare.
通过与code-with-quarkus-compare生成的参考项目对比,检查Quarkus项目的构建文件是否为最新版本。

Step 1: Detect Build Tool and Version

步骤1:检测构建工具与版本

Identify which build file exists in the project root:
FileBuild ToolTag prefix
pom.xml
Maven
maven-
build.gradle
Gradle
gradle-
build.gradle.kts
Gradle Kotlin DSL
gradle-kotlin-dsl-
Extract the Quarkus version:
  • Maven (
    pom.xml
    ):
    Look for the
    <quarkus.platform.version>
    property, or the version of
    quarkus-bom
    in
    <dependencyManagement>
  • Gradle (
    build.gradle
    ):
    Look for
    quarkusPlatformVersion
    in the
    ext
    block or
    gradle.properties
  • Gradle KTS (
    build.gradle.kts
    ):
    Look for
    val quarkusPlatformVersion
    or the BOM declaration
Construct the reference tag:
{tag_prefix}{version}
(e.g.,
maven-3.15.7
).
识别项目根目录下存在的构建文件:
文件构建工具标签前缀
pom.xml
Maven
maven-
build.gradle
Gradle
gradle-
build.gradle.kts
Gradle Kotlin DSL
gradle-kotlin-dsl-
提取Quarkus版本:
  • Maven(
    pom.xml
    ):
    查找
    <quarkus.platform.version>
    属性,或
    <dependencyManagement>
    quarkus-bom
    的版本
  • Gradle(
    build.gradle
    ):
    ext
    块或
    gradle.properties
    中查找
    quarkusPlatformVersion
  • Gradle KTS(
    build.gradle.kts
    ):
    查找
    val quarkusPlatformVersion
    或BOM声明
构建参考标签:
{tag_prefix}{version}
(例如:
maven-3.15.7
)。

Step 2: Compare Build Files Against Reference

步骤2:对比构建文件与参考版本

Fetch the reference build file:
https://raw.githubusercontent.com/quarkusio/code-with-quarkus-compare/{tag}/{build_file}
For example:
https://raw.githubusercontent.com/quarkusio/code-with-quarkus-compare/maven-3.32.4/pom.xml
Compare the user's build file against the reference, focusing on:
  • Plugin versions and configurations (compiler plugin, surefire, failsafe, quarkus-maven-plugin)
  • BOM setup (dependency management structure)
  • Build properties (Java version, encoding, surefire-plugin.version)
  • Wrapper scripts (presence of
    .mvnw
    /
    gradlew
    , wrapper version)
Ignore user-specific content (do not flag these as differences):
  • Custom dependencies not present in the reference
  • groupId, artifactId, project name, version
  • Custom profiles, modules, or build customizations
  • Application-specific configuration
Report each meaningful difference with an explanation of what the reference project has and why it matters.
If the reference tag does not exist in the repository (404), inform the user that no reference is available for their specific version and suggest checking the available tags.
获取参考构建文件:
https://raw.githubusercontent.com/quarkusio/code-with-quarkus-compare/{tag}/{build_file}
示例:
https://raw.githubusercontent.com/quarkusio/code-with-quarkus-compare/maven-3.32.4/pom.xml
将用户的构建文件与参考文件对比,重点关注:
  • 插件版本与配置(编译器插件、surefire、failsafe、quarkus-maven-plugin)
  • BOM配置(依赖管理结构)
  • 构建属性(Java版本、编码、surefire-plugin.version)
  • Wrapper脚本
    .mvnw
    /
    gradlew
    的存在与否、Wrapper版本)
忽略用户特定内容(这些差异无需标记):
  • 参考项目中没有的自定义依赖
  • groupId、artifactId、项目名称、版本
  • 自定义配置文件、模块或构建定制
  • 应用专属配置
报告每个有意义的差异,并说明参考项目的对应内容及差异的重要性。
若仓库中不存在该参考标签(返回404),告知用户其特定版本暂无参考,并建议查看可用标签

Step 3: Check for Newer Quarkus Version

步骤3:检查是否有更新的Quarkus版本

Fetch the list of tags for the user's build tool to find the latest available version:
https://github.com/quarkusio/code-with-quarkus-compare/tags
Or use git:
git ls-remote --tags https://github.com/quarkusio/code-with-quarkus-compare.git '{tag_prefix}*'
Compare the user's version against the latest tag. If the user is already on the latest version, report that and stop here.
获取对应构建工具的标签列表,找到最新可用版本:
https://github.com/quarkusio/code-with-quarkus-compare/tags
或使用git命令:
git ls-remote --tags https://github.com/quarkusio/code-with-quarkus-compare.git '{tag_prefix}*'
将用户当前版本与最新标签对比。若用户已使用最新版本,直接告知并结束流程。

Step 4: Upgrade Analysis (if outdated)

步骤4:升级分析(若版本已过时)

When a newer version is available, combine two sources of information:
当存在更新版本时,结合两类信息进行分析:

4a: Run
quarkus update --dry-run

4a:运行
quarkus update --dry-run

This requires the
quarkus
CLI to be installed. Run:
bash
quarkus update --dry-run
This produces (without modifying any files):
  • Console output: BOM update suggestions, extension sync status, matched migration recipes
  • target/rewrite/rewrite.patch
    — the actual diff of changes the update would apply
  • target/rewrite/rewrite.yaml
    — the full OpenRewrite recipe (version bumps + migration rules)
  • target/rewrite/rewrite.log
    — detailed execution log
Read
target/rewrite/rewrite.patch
to understand what code-level changes the update covers.
If the
quarkus
CLI is not available, skip this step and note it in the report.
此步骤需要安装
quarkus
CLI。执行命令:
bash
quarkus update --dry-run
该命令不会修改任何文件,将生成:
  • 控制台输出:BOM更新建议、扩展同步状态、匹配的迁移规则
  • target/rewrite/rewrite.patch
    —— 更新操作将应用的实际变更差异
  • target/rewrite/rewrite.yaml
    —— 完整的OpenRewrite规则(版本升级+迁移规则)
  • target/rewrite/rewrite.log
    —— 详细执行日志
读取
target/rewrite/rewrite.patch
以了解更新涵盖的代码级变更。
若未安装
quarkus
CLI,跳过此步骤并在报告中说明。

4b: Fetch generator diff

4b:获取生成器差异

Get the structural diff between the user's current version and the latest version using the GitHub compare view:
https://github.com/quarkusio/code-with-quarkus-compare/compare/{current_tag}...{latest_tag}
For example:
https://github.com/quarkusio/code-with-quarkus-compare/compare/maven-3.15.7...maven-3.32.4
This reveals structural changes that
quarkus update
may not cover, such as:
  • New plugin configurations (e.g.,
    <argLine>
    additions)
  • Surefire/failsafe version bumps
  • Wrapper script updates
  • Dockerfile changes
  • New or removed boilerplate files
通过GitHub对比视图获取用户当前版本与最新版本的结构差异:
https://github.com/quarkusio/code-with-quarkus-compare/compare/{current_tag}...{latest_tag}
示例:
https://github.com/quarkusio/code-with-quarkus-compare/compare/maven-3.15.7...maven-3.32.4
此视图将展示
quarkus update
可能未覆盖的结构变更,例如:
  • 新的插件配置(如新增
    <argLine>
  • Surefire/Failsafe版本升级
  • Wrapper脚本更新
  • Dockerfile变更
  • 新增或移除的模板文件

4c: Unified report

4c:统一报告

Present a combined report:
  1. Current status: Build tool, current Quarkus version, latest available version
  2. What
    quarkus update
    would handle:
    Summarize the patch (version bumps, dependency renames, config key migrations)
  3. What
    quarkus update
    does NOT cover:
    Structural differences from the generator diff that are absent from the patch — these require manual attention
  4. Recommended actions:
    • Run
      quarkus update --yes
      to apply the automated migrations
    • Manually apply remaining structural changes identified from the generator diff
    • Link to the full comparison:
      https://github.com/quarkusio/code-with-quarkus-compare/compare/{current_tag}...{latest_tag}
呈现合并后的报告:
  1. 当前状态:构建工具、当前Quarkus版本、最新可用版本
  2. quarkus update
    将处理的内容
    :总结补丁中的变更(版本升级、依赖重命名、配置键迁移)
  3. quarkus update
    未覆盖的内容
    :生成器差异中未出现在补丁里的结构变更,这些需要手动处理
  4. 推荐操作
    • 运行
      quarkus update --yes
      应用自动化迁移
    • 手动应用生成器差异中识别出的剩余结构变更
    • 提供完整对比链接:
      https://github.com/quarkusio/code-with-quarkus-compare/compare/{current_tag}...{latest_tag}