quarkus-update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuarkus 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:
| File | Build Tool | Tag prefix |
|---|---|---|
| Maven | |
| Gradle | |
| Gradle Kotlin DSL | |
Extract the Quarkus version:
- Maven (): Look for the
pom.xmlproperty, or the version of<quarkus.platform.version>inquarkus-bom<dependencyManagement> - Gradle (): Look for
build.gradlein thequarkusPlatformVersionblock orextgradle.properties - Gradle KTS (): Look for
build.gradle.ktsor the BOM declarationval quarkusPlatformVersion
Construct the reference tag: (e.g., ).
{tag_prefix}{version}maven-3.15.7识别项目根目录下存在的构建文件:
| 文件 | 构建工具 | 标签前缀 |
|---|---|---|
| Maven | |
| Gradle | |
| Gradle Kotlin DSL | |
提取Quarkus版本:
- Maven(): 查找
pom.xml属性,或<quarkus.platform.version>中<dependencyManagement>的版本quarkus-bom - Gradle(): 在
build.gradle块或ext中查找gradle.propertiesquarkusPlatformVersion - Gradle KTS(): 查找
build.gradle.kts或BOM声明val quarkusPlatformVersion
构建参考标签:(例如:)。
{tag_prefix}{version}maven-3.15.7Step 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.xmlCompare 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, wrapper version)gradlew
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的存在与否、Wrapper版本)gradlew
忽略用户特定内容(这些差异无需标记):
- 参考项目中没有的自定义依赖
- 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/tagsOr 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
quarkus update --dry-run4a:运行quarkus update --dry-run
quarkus update --dry-runThis requires the CLI to be installed. Run:
quarkusbash
quarkus update --dry-runThis produces (without modifying any files):
- Console output: BOM update suggestions, extension sync status, matched migration recipes
- — the actual diff of changes the update would apply
target/rewrite/rewrite.patch - — the full OpenRewrite recipe (version bumps + migration rules)
target/rewrite/rewrite.yaml - — detailed execution log
target/rewrite/rewrite.log
Read to understand what code-level changes the update covers.
target/rewrite/rewrite.patchIf the CLI is not available, skip this step and note it in the report.
quarkus此步骤需要安装 CLI。执行命令:
quarkusbash
quarkus update --dry-run该命令不会修改任何文件,将生成:
- 控制台输出:BOM更新建议、扩展同步状态、匹配的迁移规则
- —— 更新操作将应用的实际变更差异
target/rewrite/rewrite.patch - —— 完整的OpenRewrite规则(版本升级+迁移规则)
target/rewrite/rewrite.yaml - —— 详细执行日志
target/rewrite/rewrite.log
读取以了解更新涵盖的代码级变更。
target/rewrite/rewrite.patch若未安装 CLI,跳过此步骤并在报告中说明。
quarkus4b: 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.4This reveals structural changes that may not cover, such as:
quarkus update- New plugin configurations (e.g., additions)
<argLine> - 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:
- Current status: Build tool, current Quarkus version, latest available version
- What would handle: Summarize the patch (version bumps, dependency renames, config key migrations)
quarkus update - What does NOT cover: Structural differences from the generator diff that are absent from the patch — these require manual attention
quarkus update - Recommended actions:
- Run to apply the automated migrations
quarkus update --yes - 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}
- Run
呈现合并后的报告:
- 当前状态:构建工具、当前Quarkus版本、最新可用版本
- 将处理的内容:总结补丁中的变更(版本升级、依赖重命名、配置键迁移)
quarkus update - 未覆盖的内容:生成器差异中未出现在补丁里的结构变更,这些需要手动处理
quarkus update - 推荐操作:
- 运行应用自动化迁移
quarkus update --yes - 手动应用生成器差异中识别出的剩余结构变更
- 提供完整对比链接:
https://github.com/quarkusio/code-with-quarkus-compare/compare/{current_tag}...{latest_tag}
- 运行