slfan1989 opened a new pull request, #2399:
URL: https://github.com/apache/auron/pull/2399

   ### Which issue does this PR close?
   
   Closes #2398
   
   ### Rationale for this change
   
   The `auron-build.sh` script incorrectly handles Maven `-D` arguments.
   
   The script previously stored these arguments in a single string and added a 
leading space before the first argument. It then passed the complete string to 
Maven as one quoted argument.
   
   For example, Maven received:
   
   ```text
   " -DskipBuildNative"
   ```
   
   instead of:
   
   ```
   "-DskipBuildNative"
   ```
   
   This caused Maven to report:
   
   ```
   Unknown lifecycle phase " -DskipBuildNative"
   ```
   
   ### What changes are included in this PR?
   
   - Replace the string-based `MVN_D_ARGS` variable with a Bash array.
   - Store every Maven `-D` option as an independent array element.
   - Pass Maven properties using quoted array expansion.
   - Preserve multiple Maven properties and values containing spaces.
   - Simplify the local Maven command execution path.
   
   ### Are there any user-facing changes?
   
   Yes.
   
   Users can now pass Maven `-D` properties through `auron-build.sh` as 
documented. 
   
   For example:
   
   ```
   ./auron-build.sh --pre --sparkver 4.1 --scalaver 2.13 -DskipBuildNative
   ```
   
   Multiple Maven properties are also preserved as separate arguments.
   
   ### How was this patch tested?
   
   - Reproduced the original behavior and confirmed that the script produced:
   
   ```
   < -DskipBuildNative>
   ```
   
   - Verified that the fixed script produces:
   
   ```
   <-DskipBuildNative>
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   - [ ] Yes
   - [x] No
   
   If yes, include: `Generated-by: <tool name and version>`
   
   ASF guidance: https://www.apache.org/legal/generative-tooling.html
   


-- 
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]

Reply via email to