smengcl commented on code in PR #11535:
URL: https://github.com/apache/ozone/pull/11535#discussion_r4279730914
##########
hadoop-ozone/dev-support/checks/javadoc.sh:
##########
@@ -23,13 +23,15 @@ BASE_DIR="$(pwd -P)"
REPORT_DIR=${OUTPUT_DIR:-"${BASE_DIR}/target/javadoc"}
REPORT_FILE="$REPORT_DIR/summary.txt"
-MAVEN_OPTIONS="-B -fae -DskipDocs -DskipRecon -DskipShade
--no-transfer-progress ${MAVEN_OPTIONS:-}"
+MAVEN_OPTIONS="-B -fae -Djacoco.skip -DskipDocs -DskipRecon -DskipShade
--no-transfer-progress ${MAVEN_OPTIONS:-}"
-mvn ${MAVEN_OPTIONS} javadoc:aggregate "$@" | tee output.log
+log=$(mktemp)
Review Comment:
nit: if the run is interrupted before the `mv`, the temp file is left in
`/tmp`. `errorprone.sh` guards this with `trap 'rm -f "$OUTPUT_LOG"' EXIT` and
clears it with `trap - EXIT` after the move. Could do the same here for
consistency.
##########
hadoop-ozone/dev-support/checks/javadoc.sh:
##########
@@ -23,13 +23,15 @@ BASE_DIR="$(pwd -P)"
REPORT_DIR=${OUTPUT_DIR:-"${BASE_DIR}/target/javadoc"}
REPORT_FILE="$REPORT_DIR/summary.txt"
-MAVEN_OPTIONS="-B -fae -DskipDocs -DskipRecon -DskipShade
--no-transfer-progress ${MAVEN_OPTIONS:-}"
+MAVEN_OPTIONS="-B -fae -Djacoco.skip -DskipDocs -DskipRecon -DskipShade
--no-transfer-progress ${MAVEN_OPTIONS:-}"
-mvn ${MAVEN_OPTIONS} javadoc:aggregate "$@" | tee output.log
+log=$(mktemp)
+mvn ${MAVEN_OPTIONS} clean javadoc:aggregate "$@" | tee "${log}"
rc=$?
mkdir -p "$REPORT_DIR"
-mv output.log target/reports/apidocs ${REPORT_DIR}/
+mv -f "${log}" "${REPORT_DIR}"/output.log
Review Comment:
nit: `mktemp` creates the file with mode 0600 and `mv` keeps it, so
`output.log` is now owner readable only (previously umask default). Same as
`errorprone.sh`, so fine to ignore if that is not a concern.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]