[
https://issues.apache.org/jira/browse/TEZ-4696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lewis John McGibbney resolved TEZ-4696.
---------------------------------------
Resolution: Cannot Reproduce
> Fix Maven build: register generated-sources and fork compiler to resolve
> test-compile failures
> ----------------------------------------------------------------------------------------------
>
> Key: TEZ-4696
> URL: https://issues.apache.org/jira/browse/TEZ-4696
> Project: Apache Tez
> Issue Type: Bug
> Reporter: Lewis John McGibbney
> Assignee: Lewis John McGibbney
> Priority: Critical
> Fix For: 1.0.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> When attempting to build Tez 1.0.0-SNAPSHOT I discovered and fixed two build
> issues which were originally patched alongside TEZ-4694. It was recommended I
> propose them in a separate ticket
> # *Register generated-sources for compilation:* Use the
> build-helper-maven-plugin to add
> {{${project.build.directory}/generated-sources/java}} as a source directory
> in the {{generate-sources}} phase in tez-mapreduce, tez-runtime-library,
> tez-runtime-internals, and tez-dag. This makes protobuf-generated Java (e.g.
> DAGApiRecords, MRRuntimeProtos, ShufflePayloads, HistoryEvents) part of the
> compile source set so it is compiled and on the classpath, fixing "package
> does not exist" / "cannot find symbol" for generated types.
> # *Fork compiler and set max memory:* Configure the maven-compiler-plugin
> with {{<fork>true</fork>}} and {{<maxmem>1024m</maxmem>}} in tez-mapreduce,
> tez-runtime-internals, and tez-dag. Compilation runs in a forked JVM so main
> and test-compile don’t race on the same process, avoiding
> {{NoSuchFileException}} for {{.class}} files during test-compile (e.g. with
> parallel reactor builds).
> Trivial PR coming up
> java --version
> openjdk 21.0.10 2026-01-20
> OpenJDK Runtime Environment Homebrew (build 21.0.10)
> OpenJDK 64-Bit Server VM Homebrew (build 21.0.10, mixed mode, sharing)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)