feat(build): introduce three-tier build system and clean up profiles#7657
feat(build): introduce three-tier build system and clean up profiles#7657jsenko merged 2 commits intoApicurio:mainfrom
Conversation
|
hi @NikishaPatil This change has a minor impact on productization. There's a separate section with information. |
There was a problem hiding this comment.
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.xmlmodules into essential modules plus tierednon-essential(default) andfullprofiles. - 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.
64228b0 to
b90ffe2
Compare
…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
b90ffe2 to
272dbf3
Compare
| 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 |
There was a problem hiding this comment.
$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; thenWarning: AI suggestion. :)
There was a problem hiding this comment.
Good point, but I think it's fine in this case to keep it simple.
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
-Dfast-DfullCleanup
Removed dead flags (not read by any pom.xml):
-DskipUiBuild,-DskipUTs,-Pregressionfrom workflowsRemoved absorbed flags/profiles (superseded by tiers):
go-sdk-regenerateprofile +skipNonJavaGen— generation is now unconditionaldocs-generationprofile +skipDocsGen— generation is now unconditionalskipAppTests— redundant with-DskipTestsor-plRemoved unused infrastructure:
githubprofile +maven-snapshot-release.yamlworkflow (GitHub Packages last used 2021, stuck at v2.0.0-SNAPSHOT)java8profile (always active since project requires JDK 17;-Xdoclint:noneinlined into plugin config)Renamed for consistency (profiles: kebab-case,
-Dproperties: camelCase):cli-skip-nativeproperty →cliSkipNativecli-attach-extra-zipsproperty →cliAttachArtifactsexternal_reposprofile →external-reposOther improvements:
-Pproductizationnow auto-excludes external repos (no need for-P '!external-repos')-DskipTests=truewith-DskipTestsin workflowsCI workflow changes
Workflows doing full builds now use
-Dfull:verify-build,verify-unit-tests,release,release-images,release-artifacts.Workflows using
-plare unchanged:operator,verify-cli,verify-integration-tests,verify-extras,release(cli job),release-artifacts(builtins job).Important
Productization impact
external_reposprofile renamed toexternal-repos. However,-P '!external_repos'is no longer needed —-Pproductizationnow automatically excludes external repos via theskipExternalReposproperty. Update downstream build scripts accordingly.githubprofile removed. No impact (was only used for GitHub Packages snapshots).skipAppTestsproperty removed. Use-DskipTestsor-plto control test scope instead.-Dcli-skip-native→-DcliSkipNative,-Dcli-attach-extra-zips→-DcliAttachArtifactsTest plan
mvn clean install -Dfast -DskipTestsmvn clean install -DskipTests -DcliSkipNativemvn clean install -Dfull -DskipTests -DcliSkipNative