Incident report!

Summary:
1/ Don't use an early Java11 JDK
2/ Workaround configuration for javadoc - see "fix" below.

    Andy

== First problem

https://bugs.openjdk.java.net/browse/JDK-8212233

"""
javadoc fails on jdk12 with "The code being documented uses modules but the packages defined in $URL are in the unnamed module."
"""
This also applies to some java11 versions because of backporting from JDK12 to JDK11.0.x

The effect is the build fails in jena-iri which is the first artifact in the Jena build with javadoc.

Solution: Use a fixed jdk11. These have been around for a while now. Java 11.0.9 works.

== Second Problem

Attaching javadoc to build outputs fails for some modules.

It is the same error message as the first problem but it is a different problem, happens in Java 11.0.9 and does not affect every module. It is caused by overlapping java packages.

To provoke the error: remove the fix in the project top POM and run:

  # Java11 setup
  export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
  cd <some module>
  mvn clean verify -DskipTests

It fails in attach-javadoc (the javadoc production step has run successfully).

-- jena-text

Jena has an overlap in jena-text (JENA-2023) for package jena.
Fixable; it has possible documentation impact.

-- jena-geosparql

For some reason, this module triggers the situation as well. There is an overlap in a downstream component (org.apache.sis) but it does not look like that situation is unique, yet only this module causes an error.

== Third Problem

-- jena-text-es

Building javadoc results in an error about failing to find ElasticSearch class org.elasticsearch.client.Client. I don't see why this should be; the code compiles and passes tests.

This module does not get much care and attention and little user traffic.

== Fourth Problem

-- jena-jdbc-driver-bundle

The error here is:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project jena-jdbc-driver-bundle: MavenReportException: Error while generating Javadoc: [ERROR] Exit code: 1 - javadoc: error - error: bad value for --patch-module option: 'org.apache.jena.base='

but the configuration change also makes it go away.

== Fix

In the configuration of the maven-javadoc-plugin, add:

    <source>8</source>
    <detectJavaApiLink>false</detectJavaApiLink>

Both are needed.

This has the feel of something that will bite back sometime.

Reply via email to