slfan1989 opened a new issue, #2398: URL: https://github.com/apache/auron/issues/2398
## Description The `auron-build.sh` script does not correctly pass Maven `-D` arguments to Maven. For example, the following command is listed in the build documentation and the output of `./auron-build.sh --help`: ```bash ./auron-build.sh --pre --sparkver 4.1 --scalaver 2.13 -DskipBuildNative ``` However, the command fails with the following error: ``` [ERROR] Unknown lifecycle phase " -DskipBuildNative". ``` ## Root Cause The script stores Maven -D arguments in a string: ``` MVN_D_ARGS="$MVN_D_ARGS $1" ``` This introduces a leading space before the first argument. The complete string is then quoted and passed to Maven as a single argument. As a result, Maven receives: ``` " -DskipBuildNative" ``` instead of: ``` "-DskipBuildNative" ``` Maven therefore interprets the value as an invalid lifecycle phase. The string-based implementation also combines multiple -D arguments instead of preserving them as separate command-line arguments. ## Proposed Changes - Store Maven `-D` arguments in a Bash array. - Append each `-D` argument to the array separately. - Pass the array to Maven using quoted array expansion. - Preserve argument boundaries and values containing spaces. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
