It's a waste of time really.

Comment From: snicoll

Do you include javadoc generation? If so, I think we should keep it as recent java versions have changed requirements in subtle ways where javadoc would run on Java 8 and broke on 11 or 12.

Comment From: wilkinsona

I think we could afford to only build the javadoc on Java 8. The problems with 11 and 12 are almost always just a missing dependency. I don't think we'd be storing up too much trouble by not being aware of those till Java 11 becomes the baseline. IMO, the cost of that trouble would be outweighed by the reduced build execution time.

Comment From: dreis2211

This is problematic on another level: As of JDK-8180019 the javadoc generation fails if a link can't be accessed. This happened a handful of times this week. For example:

  • https://ci.spring.io/teams/spring-boot/pipelines/spring-boot-2.3.x/jobs/jdk11-build/builds/331
  • https://ci.spring.io/teams/spring-boot/pipelines/spring-boot-2.3.x/jobs/jdk13-build/builds/330

As the move to Gradle has reduced build times quite a lot I wonder if we can repurpose this one to ignore failures at least on JDK 11+ in an effort to make the build pipeline overall greener. But without skipping it all together. E.g. I could imagine the following (yet untested) patch:

--- a/buildSrc/src/main/java/org/springframework/boot/build/ConventionsPlugin.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/ConventionsPlugin.java
@@ -24,6 +24,7 @@ import io.spring.javaformat.gradle.FormatTask;
 import io.spring.javaformat.gradle.SpringJavaFormatPlugin;
 import org.apache.maven.artifact.repository.MavenArtifactRepository;
 import org.asciidoctor.gradle.jvm.AsciidoctorJPlugin;
+import org.gradle.api.JavaVersion;
 import org.gradle.api.Plugin;
 import org.gradle.api.Project;
 import org.gradle.api.artifacts.DependencySet;
@@ -119,8 +120,10 @@ public class ConventionsPlugin implements Plugin<Project> {
                                        args.add("-parameters");
                                }
                        });
-                       project.getTasks().withType(Javadoc.class,
-                                       (javadoc) -> javadoc.getOptions().source("1.8").encoding("UTF-8"));
+                       project.getTasks().withType(Javadoc.class, (javadoc) -> {
+                               javadoc.setFailOnError(!JavaVersion.current().isJava11Compatible());
+                               javadoc.getOptions().source("1.8").encoding("UTF-8");
+                       });
                        project.getTasks().withType(Test.class, (test) -> {

In case you think this is worthwhile, I'm more than happy to provide a PR and do further testing.

Comment From: wilkinsona

With Gradle's caching, this is now much less of an issue. Closing for now at least.