Make the build independent from linked javadoc websites

Description

None

Activity

Show:

Yoann RodièreFebruary 4, 2020 at 8:19 AM
Edited

Javadoc generation in particular relies on fetching data from linked javadoc, such as Lucene's, in order to generate proper links. See https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#links

When Lucene's website is down (happened today for all of Apache's websites), or has a transient failure (happens from time to time, say every month or so), we get this warning:

[INFO] 1 warning [WARNING] Javadoc Warnings [WARNING] javadoc: warning - Error fetching URL: http://lucene.apache.org/core/8_4_1/core/

And since we fail on Javadoc warnings, the whole build fails:

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:55 min [INFO] Finished at: 2020-02-04T07:28:49Z [INFO] ------------------------------------------------------------------------ [INFO] [jenkins-event-spy] Generated /mnt/jenkins-workdir/workspace/hibernate-search_master@tmp/withMaven467ad2c1/maven-spy-20200204-072453-6633316077978698606787.log [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:javadoc-no-fork (generate-javadoc) on project hibernate-search-backend-lucene: An error has occurred in Javadoc report generation: Project contains Javadoc Warnings -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :hibernate-search-backend-lucene

Failing on javadoc warnings makes sense: it means we won't generate invalid javadoc, or at least it makes it less likely. What makes less sense is relying on external infrastructure (other than our CI and Maven Central) during our build.

Ideally we would generate links without actually accessing the website.

offlineLinks looks like what we need. We could extract the javadoc of Lucene/etc. from Maven artifacts, and use detectJavaApiLink for the Java API.

Fixed

Details

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Created February 4, 2020 at 8:08 AM
Updated February 21, 2020 at 5:10 PM
Resolved February 18, 2020 at 1:30 PM

Flag notifications