diff --git a/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching b/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching index 03905fd20abd..821f534c4a53 100755 --- a/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching +++ b/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching @@ -132,6 +132,10 @@ run cp -p -r "${ROOT}/hadoop-ozone/dist/target/Dockerfile" . run cp -p -R "${ROOT}/hadoop-ozone/dist/src/main/keytabs" compose/_keytabs for file in $(find "${ROOT}" -path '*/target/classes/*.classpath' | sort); do + # We need to add the artifact manually as it's not part the generated classpath desciptor + module=$(basename "${file%.classpath}") + sed -i -e "s;$;:\$HDDS_LIB_JARS_DIR/${module}-${HDDS_VERSION}.jar;" "$file" + cp -n -p -v "$file" share/ozone/classpath/ done diff --git a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh index 84e2b73836e5..0e357ddbe15e 100755 --- a/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh +++ b/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh @@ -2817,14 +2817,6 @@ function ozone_assemble_classpath() { done ozone_add_classpath "${OZONE_HOME}/share/ozone/web" - #We need to add the artifact manually as it's not part the generated classpath desciptor - local MAIN_ARTIFACT - MAIN_ARTIFACT=$(find "$HDDS_LIB_JARS_DIR" -name "${OZONE_RUN_ARTIFACT_NAME}-*.jar") - if [[ -z "$MAIN_ARTIFACT" ]] || [[ ! -e "$MAIN_ARTIFACT" ]]; then - echo "ERROR: Component jar file $MAIN_ARTIFACT is missing from ${HDDS_LIB_JARS_DIR}" - fi - ozone_add_classpath "${MAIN_ARTIFACT}" - #Add optional jars to the classpath local OPTIONAL_CLASSPATH_DIR OPTIONAL_CLASSPATH_DIR="${HDDS_LIB_JARS_DIR}/${OZONE_RUN_ARTIFACT_NAME}"