This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new dded26e9dd HDDS-11588. Add main artifact jar to classpath file (#7324)
dded26e9dd is described below

commit dded26e9dde12af71d51886c28136eb36616fcfa
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Oct 30 07:04:34 2024 +0100

    HDDS-11588. Add main artifact jar to classpath file (#7324)
---
 hadoop-ozone/dist/dev-support/bin/dist-layout-stitching | 4 ++++
 hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh    | 8 --------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching 
b/hadoop-ozone/dist/dev-support/bin/dist-layout-stitching
index 03905fd20a..821f534c4a 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 84e2b73836..0e357ddbe1 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}"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to