Skip to content

feat(build): introduce three-tier build system and clean up profiles#7657

Merged
jsenko merged 2 commits intoApicurio:mainfrom
jsenko:feat/build-optimization-7628
Mar 30, 2026
Merged

feat(build): introduce three-tier build system and clean up profiles#7657
jsenko merged 2 commits intoApicurio:mainfrom
jsenko:feat/build-optimization-7628

Conversation

@jsenko
Copy link
Copy Markdown
Member

@jsenko jsenko commented Mar 27, 2026

Summary

Introduces a three-tier build system so developers can build only what they need, and cleans up dead/redundant flags, profiles, and naming inconsistencies.

Part of #7628.

Three-tier build system

Tier Flag What's included Build time
Fast -Dfast Core server, Java SDK, schema utilities ~3 min
Default (none) Fast + serializers, CLI, docs, distribution ~4 min
Full -Dfull Default + MCP server, Go SDK, operator, extra utilities ~7 min
./mvnw clean install -Dfast -DskipTests   # Fast iteration
./mvnw clean install -DskipTests           # Normal development
./mvnw clean install -Dfull -DskipTests    # Everything (CI/releases)

Cleanup

Removed dead flags (not read by any pom.xml):

  • -DskipUiBuild, -DskipUTs, -Pregression from workflows

Removed absorbed flags/profiles (superseded by tiers):

  • go-sdk-regenerate profile + skipNonJavaGen — generation is now unconditional
  • docs-generation profile + skipDocsGen — generation is now unconditional
  • skipAppTests — redundant with -DskipTests or -pl

Removed unused infrastructure:

  • github profile + maven-snapshot-release.yaml workflow (GitHub Packages last used 2021, stuck at v2.0.0-SNAPSHOT)
  • java8 profile (always active since project requires JDK 17; -Xdoclint:none inlined into plugin config)

Renamed for consistency (profiles: kebab-case, -D properties: camelCase):

  • cli-skip-native property → cliSkipNative
  • cli-attach-extra-zips property → cliAttachArtifacts
  • external_repos profile → external-repos

Other improvements:

  • -Pproductization now auto-excludes external repos (no need for -P '!external-repos')
  • Replaced -DskipTests=true with -DskipTests in workflows
  • Updated README with build tiers, properties, and testing documentation

CI workflow changes

Workflows doing full builds now use -Dfull: verify-build, verify-unit-tests, release, release-images, release-artifacts.

Workflows using -pl are unchanged: operator, verify-cli, verify-integration-tests, verify-extras, release (cli job), release-artifacts (builtins job).


Important

Productization impact

  • external_repos profile renamed to external-repos. However, -P '!external_repos' is no longer needed — -Pproductization now automatically excludes external repos via the skipExternalRepos property. Update downstream build scripts accordingly.
  • github profile removed. No impact (was only used for GitHub Packages snapshots).
  • skipAppTests property removed. Use -DskipTests or -pl to control test scope instead.
  • Property renames: -Dcli-skip-native-DcliSkipNative, -Dcli-attach-extra-zips-DcliAttachArtifacts

Test plan

  • Fast build passes: mvn clean install -Dfast -DskipTests
  • Default build passes: mvn clean install -DskipTests -DcliSkipNative
  • Full build passes: mvn clean install -Dfull -DskipTests -DcliSkipNative
  • CI verification workflows pass
  • Release workflow dry-run (optional)

@jsenko jsenko added area/CI Issues related to any of the GitHub workflows. area/build impacts/productization Changes that may affect downstream productization builds labels Mar 27, 2026
@jsenko
Copy link
Copy Markdown
Member Author

jsenko commented Mar 27, 2026

hi @NikishaPatil This change has a minor impact on productization. There's a separate section with information.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a three-tier Maven build (fast/default/full) to speed up developer iteration, while removing unused flags/profiles and standardizing naming across build properties and profiles.

Changes:

  • Reorganizes root pom.xml modules into essential modules plus tiered non-essential (default) and full profiles.
  • Removes dead/unused build flags/profiles and renames CLI/external-repos build controls for consistency.
  • Updates CI workflows and READMEs to use the new tier flags and renamed properties.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/extra-tests/README.md Removes dead -DskipUTs usage from extra-tests instructions.
pom.xml Implements tiered module profiles, removes obsolete flags/profiles, updates external repos exclusion behavior.
go-sdk/pom.xml Makes Go SDK generation execution unconditional when the module is built.
docs/config-generator/pom.xml Makes docs config generation execution unconditional when the module is built.
cli/pom.xml Renames CLI build properties to camelCase and updates related docs/comments.
cli/README.md Updates example command to use renamed CLI skip-native property.
app/pom.xml Removes the now-removed skipAppTests wiring from surefire config.
README.md Documents build tiers/properties and provides updated testing guidance.
.github/workflows/verify-unit-tests.yaml Switches unit-test workflow to -Dfull and renamed CLI property.
.github/workflows/verify-extras.yaml Removes dead flags/profiles and updates renamed CLI property.
.github/workflows/verify-build.yaml Switches build workflow to -Dfull, cleans up -DskipTests usage and CLI property name.
.github/workflows/release.yaml Updates release build commands to use -Dfull and simplified -DskipTests.
.github/workflows/release-images.yaml Updates image release build to use -Dfull and renamed CLI property.
.github/workflows/release-artifacts.yaml Updates artifact release to use -Dfull and renamed CLI attach-artifacts property.
.github/workflows/maven-snapshot-release.yaml Removes unused GitHub Packages snapshot release workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jsenko jsenko force-pushed the feat/build-optimization-7628 branch 2 times, most recently from 64228b0 to b90ffe2 Compare March 27, 2026 18:46
jsenko added 2 commits March 28, 2026 00:13
…picurio#7628)

Reorganize the Maven build into three tiers so developers can build only
what they need:

- Fast (-Dfast): core server, Java SDK, schema utilities (~3 min)
- Default (no flags): adds serializers, CLI, docs, distribution
- Full (-Dfull): adds MCP server, Go SDK, operator, extra utilities

Build cleanup:
- Remove dead flags: skipUiBuild, skipUTs, -Pregression (no effect)
- Remove absorbed flags: skipNonJavaGen, skipDocsGen, skipAppTests
  (superseded by tier system or redundant)
- Remove unused github profile and maven-snapshot-release workflow
  (GitHub Packages last used in 2021)
- Remove java8 profile (always active, project requires JDK 17);
  inline -Xdoclint:none into javadoc plugin config
- Make go-sdk generation and docs generation unconditional
  (profiles removed, code runs when module is built)

Naming consistency (profiles: kebab-case, properties: camelCase):
- Rename cli-skip-native property to cliSkipNative
- Rename cli-attach-extra-zips property to cliAttachArtifacts
- Rename external_repos profile to external-repos

Other improvements:
- productization profile now auto-excludes external repos
- Replace -DskipTests=true with -DskipTests in workflows
- Add -Dfull to CI workflows that do full builds
- Update README with build tiers, properties, and testing docs
…tests (Apicurio#7628)

Fix 5 checkstyle violations in deployment/Constants.java:
- Add missing package-info.java
- Make utility class final with private constructor
- Fix javadoc first sentence missing period
- Break long line (107 chars)
- Add missing javadoc on TEST_PROFILE field
@jsenko jsenko force-pushed the feat/build-optimization-7628 branch from b90ffe2 to 272dbf3 Compare March 27, 2026 23:14
Comment on lines +23 to +26
FLAGS="-Dfull -Pintegration-tests -Pexamples" # Have to enable all profiles, otherwise Maven can't find some modules.
FAILED=0
for MODULE in $MODULES; do
if ! ./mvnw -q checkstyle:check -pl "$MODULE" 2>/dev/null; then
if ! ./mvnw -q checkstyle:check -pl "$MODULE" $FLAGS 2>/dev/null; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$FLAGS is unquoted so word-splitting gives Maven three separate arguments. This works but is a shellcheck warning. Consider using an array instead:

FLAGS=(-Dfull -Pintegration-tests -Pexamples)
if ! ./mvnw -q checkstyle:check -pl "$MODULE" "${FLAGS[@]}" 2>/dev/null; then

Warning: AI suggestion. :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but I think it's fine in this case to keep it simple.

@jsenko jsenko merged commit 06b9df5 into Apicurio:main Mar 30, 2026
31 checks passed
@jsenko jsenko deleted the feat/build-optimization-7628 branch March 30, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build area/CI Issues related to any of the GitHub workflows. impacts/productization Changes that may affect downstream productization builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants