[improvement](build) Optimize FE incremental build packaging#62915
Merged
suxiaogang223 merged 10 commits intoMay 7, 2026
Conversation
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Document the final Maven-based FE build optimization shape, including reproducible runtime lib packaging, build-cache handling, build.sh behavior, and validation requirements. ### Release note None ### Check List (For Author) - Test: No need to test (documentation-only change) - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Avoid cleaning fe-core target on every FE build and replace copy-dependencies with a cacheable assembly archive for FE runtime libraries. Move non-daily Maven actions to explicit profiles.
### Release note
None
### Check List (For Author)
- Test: Manual test
- DISABLE_BUILD_UI=ON DISABLE_JAVA_CHECK_STYLE=ON DISABLE_BE_JAVA_EXTENSIONS=ON DISABLE_BUILD_HIVE_UDF=ON ./build.sh --fe
- mvn -f fe/pom.xml package -pl fe-core -am -DskipTests -Dcheckstyle.skip=true
- Deleted fe-core target jar and runtime lib zip, then verified Maven build cache 1.2.2 restores both artifacts.
- Compared fe-core runtime lib zip jar list with output/fe/lib third-party jar list.
- mvn -f fe/pom.xml package -pl fe-thrift -am -Prelease -DskipTests -Dcheckstyle.skip=true
- Behavior changed: No
- Does this need documentation: Yes (updated docs/dev/fe-build-optimization.md)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Align the FE build optimization design document with the current branch implementation, including the assembly zip packaging flow, build cache behavior, profile moves, and retained test-jar bindings.
### Release note
None
### Check List (For Author)
- Test: Manual test
- Ran git diff --check for docs/dev/fe-build-optimization.md
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Build FE output artifacts with Maven package instead of install so build.sh --fe only produces reactor target artifacts needed for output/fe and avoids writing local Maven repository artifacts during normal local builds.
### Release note
None
### Check List (For Author)
- Test: Manual test
- DISABLE_BUILD_UI=ON ./build.sh --fe
- git diff --check -- build.sh docs/dev/fe-build-optimization.md
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Keep source jar generation out of normal FE builds while preserving the pre-existing release artifact scope. The release profile no longer binds maven-source-plugin at the FE parent level; only modules that previously generated source artifacts keep module-local release bindings.
### Release note
None
### Check List (For Author)
- Test: Manual test
- mvn -q -Prelease help:effective-pom -Doutput=/tmp/doris-fe-release-effective-pom.xml -DskipTests -Dcheckstyle.skip=true -Dskip.doc=true
- DISABLE_BUILD_UI=ON ./build.sh --fe
- git diff --check -- modified files
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Align FE maven-build-cache configuration namespace and XSD with the 1.2.0 schema shipped by maven-build-cache-extension 1.2.2.
### Release note
None
### Check List (For Author)
- Test: Manual test
- mvn -q -f fe/pom.xml help:effective-pom -Doutput=/tmp/doris-fe-effective-pom-schema-1.2.0.xml -DskipTests -Dcheckstyle.skip=true -Dskip.doc=true
- DISABLE_BUILD_UI=ON ./build.sh --fe
- git diff --check -- fe/.mvn/maven-build-cache-config.xml
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Remove the FE build optimization plan document after its implementation checklist has been completed in code.
### Release note
None
### Check List (For Author)
- Test: Manual test
- Verified the implementation checklist against current code
- Confirmed no remaining references to docs/dev/fe-build-optimization.md
- git diff --check -- docs/dev/fe-build-optimization.md
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Disable recompression of already-compressed runtime dependency jars when building the FE runtime lib assembly. This reduces Maven assembly heap pressure during build.sh --fe while preserving the unpacked output/fe/lib contents.
### Release note
None
### Check List (For Author)
- Test: Manual test
- DISABLE_BUILD_UI=ON ./build.sh --fe
- git diff --check -- fe/fe-core/pom.xml
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Update run-fe-ut.sh coverage commands to activate the coverage profile after JaCoCo configuration was moved out of default FE builds. This keeps normal FE unit test builds free of JaCoCo while preserving coverage report generation when --coverage is requested.
### Release note
None
### Check List (For Author)
- Test: Manual test
- ./run-fe-ut.sh --coverage --run org.apache.doris.common.PatternMatcherTest
- git diff --check -- run-fe-ut.sh
- Behavior changed: No
- Does this need documentation: No
Member
Author
|
run buildall |
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Ensure the standalone CDC client build installs a flattened fe-common POM before resolving it outside the FE reactor. This prevents Maven from seeing an unresolved ${revision} parent version after flatten was moved out of the default FE build path.
### Release note
None
### Check List (For Author)
- Test: Manual test
- ./fs_brokers/cdc_client/build.sh
- git diff --check -- fe/pom.xml fs_brokers/cdc_client/build.sh
- Behavior changed: No
- Does this need documentation: No
Member
Author
|
run buildall |
morrySnow
approved these changes
May 6, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
morningman
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
This PR optimizes the Doris FE build path so ordinary
./build.sh --febuilds no longer clearfe-core/targetor rebuild runtime dependency directories as a side effect.The main changes are:
maven-clean-plugin:auto-cleanexecution fromfe-core, so Maven can reusetarget/classesfor incremental compilation.maven-dependency-plugin:copy-dependencieswithmaven-assembly-pluginand producefe/fe-core/target/doris-fe-lib.zipas a Maven package artifact.build.sh --feto run Mavenpackageinstead ofinstall, then unpackdoris-fe-lib.zipintooutput/fe/lib.run-fe-ut.sh --coveragealigned with the new explicit coverage profile so normal FE UTs do not enable JaCoCo, while coverage runs still attach the JaCoCo agent and generate reports.copy-dependenciesrunAlwaysworkaround and align the build-cache config schema with the1.2.0schema shipped bymaven-build-cache-extension:1.2.2.fe-commonPOM beforecdc_clientresolves it outside the FE reactor.Release note
None
Check List (For Author)
Test
mvn -q -Prelease help:effective-pom -Doutput=/tmp/doris-fe-release-effective-pom.xml -DskipTests -Dcheckstyle.skip=true -Dskip.doc=truemvn -q -f fe/pom.xml help:effective-pom -Doutput=/tmp/doris-fe-effective-pom-schema-1.2.0.xml -DskipTests -Dcheckstyle.skip=true -Dskip.doc=trueMAVEN_OPTS="-Xmx8g" DISABLE_BUILD_UI=ON ./build.sh --feDISABLE_BUILD_UI=ON ./build.sh --fe./run-fe-ut.sh --coverage --run org.apache.doris.common.PatternMatcherTest./fs_brokers/cdc_client/build.shBehavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)