As a workaround, one can download the Maven "Binary tar.gz archive" from https://maven.apache.org/download.cgi, extract it somewhere and add the following line to the PKGBUILD, directly below the export JAVA_HOME=...
line in build():
export PATH=/path/to/your/extracted/apache-maven-3.9.4/bin:$PATH
Maybe it would even make sense to temporarily let the PKGBUILD download and use a recent Maven itself.
Pinned Comments
Cobra commented on 2023-08-19 13:34 (UTC)
Thanks to Bevan, we now have a simple and elegant (compared to my attempt) workaround that lets the PKGBUILD download and use the most recent version of maven (currently 3.9.4). Should not need any intervention from you. :)