slfan1989 commented on code in PR #2461:
URL: https://github.com/apache/auron/pull/2461#discussion_r3765234413


##########
auron-build.sh:
##########
@@ -523,11 +524,20 @@ MVN_ARGS=("${CLEAN_ARGS[@]}" "${BUILD_ARGS[@]}")
 # Description:
 #   Generate auron-build-info.properties for build metadata tracking.
 # -----------------------------------------------------------------------------
-BUILD_INFO_FILE="common/src/main/resources/auron-build-info.properties"
+BUILD_INFO_FILE="$SCRIPT_DIR/common/src/main/resources/auron-build-info.properties"
 mkdir -p "$(dirname "$BUILD_INFO_FILE")"
 
 JAVA_VERSION=$(java -version 2>&1 | head -n 1 | awk '{print $3}' | tr -d '"')
-PROJECT_VERSION=$(./build/mvn help:evaluate -N -Dexpression=project.version 
-Pspark-${SPARK_VER} -q -DforceStdout 2>/dev/null)
+MVN_STDERR=$(mktemp)
+if ! PROJECT_VERSION=$("$MVN_CMD" help:evaluate -N -f "$SCRIPT_DIR/pom.xml" 
-Dexpression=project.version -Pspark-${SPARK_VER} -q -DforceStdout 
2>"$MVN_STDERR") \

Review Comment:
   Thanks for the contribution! The version lookup is now pinned to the project 
POM, but the final Maven invocation below still runs without `-f 
"$SCRIPT_DIR/pom.xml"`. When the script is invoked outside the repository, 
build-info generation succeeds, but the actual build still fails with 
`MissingProjectException` because Maven searches for a POM in the caller's 
directory. Please also pin the final Maven invocation to the project POM and 
add regression coverage for running the complete local build from another 
directory.



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