Thus far I've forked the Git repo:

https://github.com/apache/hadoop

I've been looking around for information on how to build from source, I've tried this command:

mvn package -Pdist -Dtar -DskipTests

which resulted in the following error:

It doesn't seem that there's good documentation about this, does anyone know the right procedure?

UPDATE:

Also tried in this way:

According to this file, you need to get get protoc to work for the package to build

brew link --force --overwrite protobuf250

The macOS dependencies are:

$ brew install cmake $ brew install zlib $ brew install protobuf $ brew install snappy

but to no avail:

By the way, the official docs are totally unhelpful- they essentially say "use a Docker container"