Javadoc is required to publish on OSSRH/Maven Central.
Javadoc generation is done in the workflow which does the release, but not tested before. Therefore, if an error occurs in the javadoc generation, the workflow fails.
To prevent this, javadoc generation should be tested before launching the workflow, may be when a PR is submitted or modified.