From: Eric Ball Date: Mon, 20 Jan 2020 21:00:09 +0000 (+0000) Subject: Merge "Revise javadoc script dash-f argument" X-Git-Tag: v0.50.0~11 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=5fe90576c6f500ff92fbe7b76e42aad7d5d35fcd;hp=725220518be40c04b46c2fce670d6c395a6557b3;p=releng%2Fglobal-jjb.git Merge "Revise javadoc script dash-f argument" --- diff --git a/releasenotes/notes/maven-javadoc-dash-f-87c652e0363b3c6d.yaml b/releasenotes/notes/maven-javadoc-dash-f-87c652e0363b3c6d.yaml new file mode 100644 index 00000000..bb3e5ce4 --- /dev/null +++ b/releasenotes/notes/maven-javadoc-dash-f-87c652e0363b3c6d.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Revise shell script maven-javadoc-generate.sh to supply -f + argument to maven with argument translated by call to readlink. + This works around the javadoc:aggregate behavior of silently + doing nothing if invoked "-f ." diff --git a/shell/maven-javadoc-generate.sh b/shell/maven-javadoc-generate.sh index 137f4d7a..0f1cac3c 100644 --- a/shell/maven-javadoc-generate.sh +++ b/shell/maven-javadoc-generate.sh @@ -21,19 +21,23 @@ mkdir -p "$WORKSPACE/archives" export MAVEN_OPTS +# use absolute path as workaround for javadoc:aggregate +# silent failure on relative path, for example "-f ." +maven_dir_abs=$(readlink -f $MAVEN_DIR) + # Disable SC2086 because we want to allow word splitting for $MAVEN_* parameters. # shellcheck disable=SC2086 # Use -x via subshell to show maven invocation details in the log (set -x $MVN clean install javadoc:aggregate \ + -f "$maven_dir_abs" \ -e -Pq -Dmaven.javadoc.skip=false \ -DskipTests=true \ -Dcheckstyle.skip=true \ -Dfindbugs.skip=true \ --global-settings "$GLOBAL_SETTINGS_FILE" \ --settings "$SETTINGS_FILE" \ - -f "$MAVEN_DIR" \ - $MAVEN_OPTIONS $MAVEN_PARAMS \ + $MAVEN_OPTIONS $MAVEN_PARAMS ) mv "$WORKSPACE/$MAVEN_DIR/target/site/apidocs" "$JAVADOC_DIR"