docs/_utils/javadoc.sh moves the generated javadoc out with mv -f "${JAVADOC_FILES[@]}" "$OUTPUT_DIR", which empties the source directory but leaves it in place. maven-javadoc-plugin records target/maven-javadoc-plugin-stale-data.txt and, per its own staleDataPath documentation, uses it "to skip the generation if nothing has changed".
So a second make -C docs javadoc in the same tree with no source change: the plugin skips generation, the -d test passes on the empty leftover directory, the new empty-output check fires, and the script exits 1.
CI is unaffected — sphinx-multiversion gives each version a fresh checkout — but local reruns hard-fail with a message that does not describe the cause.
Fix: copy instead of move (cp -a "$JAVADOC_SOURCE_DIR"/. "$OUTPUT_DIR"/), or remove the source directory after moving so the next run regenerates.
Refs: https://scylladb.atlassian.net/browse/DRIVER-1086
Jira: https://scylladb.atlassian.net/browse/DRIVER-1092
docs/_utils/javadoc.shmoves the generated javadoc out withmv -f "${JAVADOC_FILES[@]}" "$OUTPUT_DIR", which empties the source directory but leaves it in place.maven-javadoc-pluginrecordstarget/maven-javadoc-plugin-stale-data.txtand, per its ownstaleDataPathdocumentation, uses it "to skip the generation if nothing has changed".So a second
make -C docs javadocin the same tree with no source change: the plugin skips generation, the-dtest passes on the empty leftover directory, the new empty-output check fires, and the script exits 1.CI is unaffected —
sphinx-multiversiongives each version a fresh checkout — but local reruns hard-fail with a message that does not describe the cause.Fix: copy instead of move (
cp -a "$JAVADOC_SOURCE_DIR"/. "$OUTPUT_DIR"/), or remove the source directory after moving so the next run regenerates.Refs: https://scylladb.atlassian.net/browse/DRIVER-1086
Jira: https://scylladb.atlassian.net/browse/DRIVER-1092