NihalJain commented on code in PR #144:
URL: https://github.com/apache/hbase-thirdparty/pull/144#discussion_r2231817863


##########
dev-support/jenkins/Dockerfile:
##########
@@ -110,14 +112,60 @@ ENV MAVEN_HOME='/opt/maven'
 RUN mv /opt/maven/bin/mvn /opt/maven/bin/mvn-original && \
     cat > /opt/maven/bin/mvn <<'EOF'
 #!/bin/bash
-TOOLCHAIN="${BASEDIR}/dev-support/toolchains-jenkins.xml"
-if [ -f "$TOOLCHAIN" ]; then
+
+echo "Maven wrapper called with args: $@"
+echo "Current working directory: $(pwd)"
+echo "BASEDIR environment variable: ${BASEDIR:-'(not set)'}"
+echo "MAVEN_HOME: ${MAVEN_HOME:-'(not set)'}"
+
+# Ensure Maven home exists
+if [ ! -d "${MAVEN_HOME}" ]; then
+  echo "ERROR: MAVEN_HOME directory does not exist: ${MAVEN_HOME}"
+  exit 1
+fi
+
+if [ ! -f "${MAVEN_HOME}/bin/mvn-original" ]; then
+  echo "ERROR: mvn-original not found at: ${MAVEN_HOME}/bin/mvn-original"
+  exit 1
+fi
+
+# Try multiple possible locations for the toolchains file
+TOOLCHAIN_LOCATIONS=(
+  "${BASEDIR}/dev-support/toolchains-jenkins.xml"
+  "$(pwd)/dev-support/toolchains-jenkins.xml"

Review Comment:
   may be we do not need to try for different dirs as it should found in 1st 
dir itself? but why not, not a problem too? WDYT?



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to