[
https://issues.apache.org/jira/browse/HDDS-11588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-11588:
------------------------------------
Status: Patch Available (was: In Progress)
> Add main artifact jar to classpath file
> ---------------------------------------
>
> Key: HDDS-11588
> URL: https://issues.apache.org/jira/browse/HDDS-11588
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: build
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Major
> Labels: pull-request-available
>
> Classpath file for Ozone components only include dependencies, but not the
> component's own jar file. Thus, Ozone needs to find it at runtime:
> {code:title=https://github.com/apache/ozone/blob/2139367b52d68773f25d79abce0439323dde9671/hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh#L2820-L2826}
> #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}"
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]