Skip to content

[opt](build) enable maven cache and check maven version#60819

Merged
hello-stephen merged 1 commit intoapache:masterfrom
morrySnow:add_maven_cache
Mar 1, 2026
Merged

[opt](build) enable maven cache and check maven version#60819
hello-stephen merged 1 commit intoapache:masterfrom
morrySnow:add_maven_cache

Conversation

@morrySnow
Copy link
Contributor

What problem does this PR solve?

Problem Summary:

This pull request updates the Maven build configuration to enforce a minimum Maven version and improve build performance through caching. The most important changes are:

Build requirements and enforcement:

  • Added the maven-enforcer-plugin (version 3.6.2) to the fe/pom.xml build plugins, enforcing that Maven version 3.9.0 or higher is required to build the project.

Build performance improvements:

  • Added the maven-build-cache-extension (version 1.2.2) to the fe/pom.xml build extensions, enabling build caching to speed up repeated builds.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Feb 25, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morrySnow
Copy link
Contributor Author

run buildall

@morrySnow morrySnow marked this pull request as draft February 25, 2026 04:07
@morrySnow
Copy link
Contributor Author

run buildall

@morrySnow morrySnow marked this pull request as ready for review February 28, 2026 09:26
@doris-robot
Copy link

TPC-H: Total hot run time: 28706 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 4c709a45512e12bd1a8f4d321719a40fe6a27b9c, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17635	4468	4315	4315
q2	q3	10652	762	519	519
q4	4676	362	250	250
q5	7528	1175	1023	1023
q6	177	175	144	144
q7	767	828	673	673
q8	9275	1442	1316	1316
q9	4940	4748	4724	4724
q10	6798	1871	1649	1649
q11	483	259	238	238
q12	747	557	466	466
q13	17785	4254	3393	3393
q14	225	228	216	216
q15	962	799	788	788
q16	760	719	663	663
q17	708	857	422	422
q18	5957	5380	5263	5263
q19	1106	972	628	628
q20	500	493	392	392
q21	4623	1860	1383	1383
q22	338	283	241	241
Total cold run time: 96642 ms
Total hot run time: 28706 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4413	4308	4330	4308
q2	q3	1742	2178	1772	1772
q4	836	1161	770	770
q5	3995	4328	4334	4328
q6	174	171	138	138
q7	1727	1604	1477	1477
q8	2424	2653	2523	2523
q9	7448	7668	7433	7433
q10	2705	2908	2439	2439
q11	522	463	420	420
q12	499	598	454	454
q13	4064	4430	3704	3704
q14	288	305	285	285
q15	911	825	778	778
q16	712	769	699	699
q17	1207	1578	1291	1291
q18	7116	6857	6710	6710
q19	910	855	879	855
q20	2079	2163	2000	2000
q21	4100	3470	3570	3470
q22	489	452	381	381
Total cold run time: 48361 ms
Total hot run time: 46235 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184638 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 4c709a45512e12bd1a8f4d321719a40fe6a27b9c, data reload: false

query5	4722	637	536	536
query6	324	218	204	204
query7	4217	470	267	267
query8	330	253	227	227
query9	8723	2785	2792	2785
query10	543	370	332	332
query11	17130	17603	17516	17516
query12	196	124	126	124
query13	1240	475	332	332
query14	7703	3293	3126	3126
query14_1	2879	2931	2913	2913
query15	210	225	186	186
query16	1029	484	477	477
query17	1177	721	628	628
query18	2737	467	347	347
query19	277	274	189	189
query20	137	131	127	127
query21	219	140	114	114
query22	5639	5423	4818	4818
query23	17343	16719	16653	16653
query23_1	16741	16928	16638	16638
query24	7074	1625	1218	1218
query24_1	1251	1243	1231	1231
query25	564	479	448	448
query26	1228	261	147	147
query27	2796	483	294	294
query28	4466	1869	1878	1869
query29	790	560	465	465
query30	313	250	210	210
query31	878	714	632	632
query32	81	75	71	71
query33	511	341	287	287
query34	903	894	566	566
query35	668	685	579	579
query36	1118	1167	957	957
query37	138	99	79	79
query38	3037	2924	2859	2859
query39	891	841	850	841
query39_1	818	819	849	819
query40	228	153	137	137
query41	66	59	59	59
query42	104	102	99	99
query43	365	376	353	353
query44	
query45	201	191	181	181
query46	875	968	608	608
query47	2094	2137	2057	2057
query48	319	315	232	232
query49	617	466	414	414
query50	676	279	210	210
query51	4082	4089	4078	4078
query52	105	105	95	95
query53	291	338	276	276
query54	294	266	253	253
query55	91	84	80	80
query56	304	319	299	299
query57	1360	1346	1273	1273
query58	290	277	297	277
query59	2600	2636	2509	2509
query60	333	332	325	325
query61	153	143	151	143
query62	659	598	571	571
query63	318	283	276	276
query64	4872	1273	996	996
query65	
query66	1390	458	355	355
query67	16401	16525	16334	16334
query68	
query69	412	306	318	306
query70	1028	991	976	976
query71	348	317	319	317
query72	3007	2848	2601	2601
query73	537	552	326	326
query74	9975	9942	9760	9760
query75	2879	2755	2482	2482
query76	2316	1039	688	688
query77	366	386	318	318
query78	11266	11312	10745	10745
query79	3185	768	605	605
query80	1797	657	569	569
query81	593	291	248	248
query82	965	154	144	144
query83	329	259	245	245
query84	253	119	98	98
query85	883	492	427	427
query86	492	309	293	293
query87	3161	3108	3023	3023
query88	3593	2667	2673	2667
query89	422	365	351	351
query90	2107	181	172	172
query91	160	157	143	143
query92	84	73	70	70
query93	2416	802	493	493
query94	652	313	288	288
query95	589	401	313	313
query96	634	515	236	236
query97	2471	2514	2431	2431
query98	229	214	221	214
query99	1007	990	920	920
Total cold run time: 259999 ms
Total hot run time: 184638 ms

@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2026

PR approved by anyone and no changes requested.

@hello-stephen hello-stephen merged commit a81c501 into apache:master Mar 1, 2026
28 of 30 checks passed
hello-stephen added a commit that referenced this pull request Mar 3, 2026
#60964)

…ven cache

Problem:
- When Maven build cache is hit, the dependency:copy-dependencies plugin
  execution is skipped
- This causes target/lib directory to be missing in hadoop-deps module
- Results in an incomplete BE output package without Hadoop dependencies

Solution:
- Add automatic regeneration logic in build.sh copy phase
- When lib directory is missing and BUILD_BE_JAVA_EXTENSIONS=1,
  execute 'mvn dependency:copy-dependencies' to regenerate it
- Preserves Maven cache benefits while ensuring complete output

Impact:
- Fixes intermittent missing hadoop_hdfs jars in BE output
- No impact on normal build flow (only triggers when needed)
- Maintains build cache acceleration for other plugins

Related PR: #60819
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants