Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-11276 Clean up dependencies
  3. HDDS-11588

Add main artifact jar to classpath file

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • 2.0.0
    • build

    Description

      Classpath file for Ozone components only include dependencies, but not the component's own jar file. Thus, Ozone needs to find it at runtime:

        #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}"
      

      This causes startup error if multiple versions of the same component happen to be present in the $HDDS_LIB_JARS_DIR directory.

      It would be nice to add main artifacts to the classpath files at build time.

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: