quarkus-full-build

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Quarkus Full Build

Quarkus 全量构建

Run a complete build of the Quarkus project with optimized settings.
使用优化设置运行Quarkus项目的完整构建。

Overview

概述

This skill executes a full Quarkus build using Maven with flags optimized for speed and the Quarkus project structure. The build is dispatched to a subagent to keep your main conversation responsive during the long-running compilation.
本技能通过Maven执行全量Quarkus构建,使用针对运行速度和Quarkus项目结构优化的参数。构建任务会被分发到subagent执行,避免长时间编译过程中主对话失去响应。

When to Use

适用场景

  • User asks to "do a full build"
  • User requests "complete build" or "rebuild everything"
  • User wants to "build the whole project"
  • After major changes that require rebuilding all modules
  • Before running integration tests
  • When preparing a release or deployment
When NOT to use:
  • For building specific modules (use
    quarkus-module-build
    instead)
  • For incremental compilation (just run
    mvn compile
    directly)
  • For running tests only (use
    mvn test
    directly)
  • 用户要求「执行全量构建」
  • 用户请求「完整构建」或「重建所有内容」
  • 用户想要「构建整个项目」
  • 进行了需要重建所有模块的重大变更后
  • 运行集成测试之前
  • 准备版本发布或部署时
不适用场景:
  • 构建特定模块(请改用
    quarkus-module-build
  • 增量编译(直接运行
    mvn compile
    即可)
  • 仅运行测试(直接运行
    mvn test
    即可)

Quick Reference

快速参考

Build command:
bash
mvn install -Dquickly -Dno-test-modules -Dskip.gradle.build=true -T 16C -Prelocations
Flags explained:
  • -Dquickly
    - Skip tests, formatting checks, and other non-essential tasks
  • -Dno-test-modules
    - Don't build test-only modules
  • -Dskip.gradle.build=true
    - Skip Gradle-based builds (Quarkus is Maven)
  • -T 16C
    - Parallel build with 16 threads per CPU core
  • -Prelocations
    - Use relocations profile for optimized dependencies
Typical build time: 5-15 minutes (depends on project size and machine)
构建命令:
bash
mvn install -Dquickly -Dno-test-modules -Dskip.gradle.build=true -T 16C -Prelocations
参数说明:
  • -Dquickly
    - 跳过测试、格式检查和其他非必要任务
  • -Dno-test-modules
    - 不构建仅用于测试的模块
  • -Dskip.gradle.build=true
    - 跳过基于Gradle的构建(Quarkus使用Maven)
  • -T 16C
    - 每个CPU核心使用16个线程并行构建
  • -Prelocations
    - 使用重定位profile实现依赖优化
**典型构建时长:**5-15分钟(取决于项目大小和机器性能)

Implementation

实现流程

Step 1: Dispatch Build to Subagent

步骤1:将构建任务分发到Subagent

Use the Agent tool to run the build in a separate context. This keeps the main conversation responsive while the build runs.
Subagent prompt:
Run a full Quarkus build with the following command:

mvn install -Dquickly -Dno-test-modules -Dskip.gradle.build=true -T 16C -Prelocations

Monitor the Maven output and report:
1. Whether the build succeeded or failed
2. If it failed, include the relevant error output (compilation errors, test failures, etc.)
3. Total build time

Do not include the full Maven output unless there are errors.
使用Agent工具在独立上下文中运行构建任务,这样可以在构建运行时保持主对话的响应性。
Subagent提示词:
使用以下命令运行Quarkus全量构建:

mvn install -Dquickly -Dno-test-modules -Dskip.gradle.build=true -T 16C -Prelocations

监控Maven输出并上报:
1. 构建是否成功
2. 如果失败,附上相关错误输出(编译错误、测试失败等)
3. 总构建时长

除非出现错误,否则不需要返回完整的Maven输出。

Step 2: Monitor Subagent Progress

步骤2:监控Subagent进度

The subagent will:
  1. Execute the Maven build command
  2. Watch for success/failure indicators in Maven output
  3. Report back when complete
You don't need to poll - the subagent will notify when done.
Subagent会执行以下操作:
  1. 执行Maven构建命令
  2. 监控Maven输出中的成功/失败标识
  3. 任务完成后返回结果
你不需要轮询,Subagent完成后会自动通知。

Step 3: Report Results

步骤3:上报结果

After the subagent completes, summarize:
On success:
✓ Full Quarkus build completed successfully in 8m 42s

The project is ready for testing or deployment.
On failure:
✗ Full Quarkus build failed during compilation

Error in extensions/quarkus-graphql/runtime:
[ERROR] /path/to/GraphQLService.java:[45,23] cannot find symbol
  symbol:   method getSchema()
  location: variable config of type GraphQLConfig

The GraphQLService class is calling a method that doesn't exist in GraphQLConfig.
Subagent执行完成后,总结结果:
构建成功时:
✓ Quarkus全量构建成功完成,耗时8分42秒

项目已准备好进行测试或部署。
构建失败时:
✗ Quarkus全量构建在编译阶段失败

extensions/quarkus-graphql/runtime中出现错误:
[ERROR] /path/to/GraphQLService.java:[45,23] cannot find symbol
  symbol:   method getSchema()
  location: variable config of type GraphQLConfig

GraphQLService类调用了GraphQLConfig中不存在的方法。

Step 4: Offer Next Steps

步骤4:提供后续操作建议

After success:
  • Suggest running tests if they were skipped
  • Offer to build specific modules if changes are localized
  • Mention deployment options if appropriate
After failure:
  • Identify the failing module
  • Suggest fixes based on error type
  • Offer to build just the failing module after fixes
构建成功后:
  • 如果测试被跳过,建议运行测试
  • 如果变更只涉及局部模块,提供构建特定模块的选项
  • 合适的情况下提及部署选项
构建失败后:
  • 指出失败的模块
  • 根据错误类型给出修复建议
  • 修复完成后提供仅构建失败模块的选项

Common Build Flags

常用构建参数

FlagPurposeWhen to Use
-Dquickly
Skip tests and checksFast feedback during development
-DskipTests
Skip test execution onlyWhen tests are slow but you want other checks
-T 1C
Single-threadedDebugging build order issues
-T 16C
Parallel (16 threads/core)Fast builds on powerful machines
-am
Also make dependenciesBuilding a module with its dependencies
-pl module
Build specific moduleTesting changes in one module
参数用途适用场景
-Dquickly
跳过测试和检查开发过程中快速获得反馈
-DskipTests
仅跳过测试执行测试运行较慢但你需要执行其他检查时
-T 1C
单线程执行调试构建顺序问题
-T 16C
并行执行(每核心16线程)高性能机器上实现快速构建
-am
同时构建依赖项构建模块及其所有依赖
-pl module
构建特定模块测试单个模块的变更

Build Troubleshooting

构建问题排查

Out of memory:
bash
export MAVEN_OPTS="-Xmx4g -XX:MaxMetaspaceSize=1g"
mvn install -Dquickly ...
Stale artifacts:
bash
mvn clean install -Dquickly ...
Dependency resolution issues:
bash
mvn dependency:purge-local-repository
mvn install -Dquickly ...
内存不足:
bash
export MAVEN_OPTS="-Xmx4g -XX:MaxMetaspaceSize=1g"
mvn install -Dquickly ...
构件过时:
bash
mvn clean install -Dquickly ...
依赖解析问题:
bash
mvn dependency:purge-local-repository
mvn install -Dquickly ...

Platform Notes

平台说明

This skill is platform-agnostic:
  • Claude Code: Use Agent tool for subagent dispatch
  • Gemini CLI: Use SubAgent tool
  • Codex: Use SubAgent/Background execution
The Maven command itself is universal across all platforms.
本技能不受平台限制:
  • Claude Code:使用Agent工具分发subagent任务
  • Gemini CLI:使用SubAgent工具
  • Codex:使用SubAgent/后台执行
Maven命令本身在所有平台上通用。

Related Skills

相关技能

  • quarkus-module-build - Build specific modules only
  • java-classpath-search - Find dependencies after build
  • java-decompile - Inspect built classes
  • quarkus-module-build - 仅构建特定模块
  • java-classpath-search - 构建完成后查找依赖
  • java-decompile - 检查已构建的类文件