Skip to content

ci: javadoc.sh cannot be run twice in the same tree #1106

Description

@nikagra

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions