| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ld.sh auron-build.sh always builds through build/mvn, which downloads Maven and so fails in an offline or airgapped build, always runs the install goal, and cannot forward Maven options other than -D. That makes it hard to call from a wrapper script. Add --mvn to build with an already installed Maven, accepting either a path or a command on PATH. Add --goal, defaulting to install so existing callers are unaffected, so a caller can run package and leave the local repository alone. Accept -- as an end-of-options marker so options such as -P, -B and --no-transfer-progress reach Maven, alongside the existing -D handling from apache#2227.
There was a problem hiding this comment.
Thanks for the contribution! The overall approach looks good, but --mvn does not yet fully bypass the Maven wrapper, and passthrough arguments are dropped in Docker mode. Please see my inline comments.
Sorry, something went wrong.
There was a problem hiding this comment.
--mvn is intended to bypass build/mvn for offline or air-gapped builds, but project-version resolution still invokes ./build/mvn directly. Please use "$MVN_CMD" here as well; otherwise this step may still trigger the wrapper’s download path and fail offline.
Sorry, something went wrong.
There was a problem hiding this comment.
The passthrough arguments remaining in "$@" are only forwarded by the local Maven invocation. Docker mode exports BUILD_ARGS alone, so arguments after -- are silently dropped. Please forward the passthrough arguments into the container as well, while preserving argument boundaries, or explicitly reject/document passthrough as unsupported in Docker mode.
Sorry, something went wrong.
…n, forward passthrough args in Docker Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addressed! Thanks for the review, @slfan1989! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What changes were proposed in this pull request?
Fixes #2460.
Three small additions that make auron-build.sh usable as a build step inside another script, and on machines without network access:
This is independent of #2461 and the two can merge in either order.
How was this patch tested?
Manually, with a stub Maven that echoes its arguments so the composed command line is visible.
All three together:
$ bash auron-build.sh --release --mvn /tmp/stubmvn --goal package \ --sparkver 3.1 --scalaver 2.12 -- -Pceleborn-0.6 -B --no-transfer-progress STUB_MVN_INVOKED_WITH: clean package -DskipTests -Prelease -Pspark-3.1 -Pscala-2.12 -Pceleborn-0.6 -B --no-transfer-progressThe goal is package rather than install, and -P, -B and the long option all arrive intact.
Also checked: