I am doing a number of source builds.
I run this:
RUN --mount=type=cache,target=/root/.m2 cd /build/hd_src/ && mvn install
-DskipTests --projects
'!hadoop-tools/hadoop-gcp,!hadoop-client-modules/hadoop-client-minicluster,!hadoop-tools/hadoop-datajoin,!hadoop-tools/hadoop-benchmark'

Here is why:
!hadoop-tools/hadoop-gcp: If I am not doing GCP this assembly takes a long
time

hadoop-client-modules/hadoop-client-minicluster : It is really hard fo me
to find a reason to want an assembly of something I would only ever
reference from a pom file in the test scope.

!hadoop-tools/hadoop-datajoin: It takes a considerably long time to build
this considering how useless it is. Maybe merge it with some other example

hadoop-tools/hadoop-benchmark': Another assembly and its hard to believe
this thing need to be rebuilt so frequently.

These changes are especially noticeable on limited hardware. Your docker
"cache" volume might be 500MB small and your build times 200 seconds faster.

Also the build tools being lock-step with the release is challenging.

-RUN --mount=type=cache,target=/root/.m2 cd /build/hd_src/ && mvn install
-DskipTests
-#RUN --mount=type=cache,target=/root/.m2 cd /build/hd_src/hadoop-project
&& mvn install -DskipTests
-#RUN --mount=type=cache,target=/root/.m2 cd
/build/hd_src/hadoop-build-tools && mvn install -DskipTests
-#RUN --mount=type=cache,target=/root/.m2 cd
/build/hd_src/hadoop-maven-plugins && mvn install -DskipTests

If you check out "trunk" 3.5.0-SNAPSHOT and want to build module/module-1
you first need to build yourself so you have your build tools. It really
feels like 3.5.0-SNAPSOT would be better off with relying on
hadoop-build-tools-2.2.2 and only releasing those things when there is a
functional change as a portion of the build is also building the build
tools that ultimately aren't changing.

Reply via email to