Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 11 javadoc fixes. Turn on failOnError #1386

Merged
merged 20 commits into from
Mar 13, 2020

Conversation

barchetta
Copy link
Member

@barchetta barchetta commented Feb 13, 2020

This PR does gets javadocs building on Java 11 (see issue #1223). To do so I broke cross reference links to third party javadocs. We will need to fix that later. But this gets javadocs building again. Here is a summary of the changes:

  1. Comment out the configuration for links (offlineLinks). Because we are generating Java 11 javadocs there are various issues with class-path and module-path hygiene (plus the infamous Java 11 javadoc bug). So for now, we avoid that rat's nest. This means those cross-reference links are broken, but at least we have javadocs.

  2. Fix and add module-info files as needed so the maven-javadoc-plugin passes a correct module-path to javadoc. This usually meant adding require statements.

  3. Switch to use the javadoc aggregate goal as part of the site lifecycle to build aggregated javadocs

  4. Fix basic javadoc errors

Still working on an issue, where the aggregate goal does not work well unless the maven artifacts have already been built (it gets the module-path wrong). So for now we build the aggregated javadocs after the main build.

To build the aggregated javadocs you now run:

mvn site -Dversion.plugin.javadoc=3.2.0 -DskipTests -Pjavadoc

It will generate the aggregated javadocs and the documentation. This currently requires you to build version 3.2.0 of the maven-javadoc-plugin yourself. We expect it to be released any day now so that hack will be removed shortly.

@barchetta barchetta added this to the 2.0.0 milestone Feb 13, 2020
@barchetta barchetta self-assigned this Feb 13, 2020
ljnelson
ljnelson previously approved these changes Feb 13, 2020
Copy link
Member

@ljnelson ljnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

config/etcd/src/main/java/module-info.java Outdated Show resolved Hide resolved
config/pom.xml Outdated Show resolved Hide resolved
@@ -274,7 +270,7 @@
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<scope>runtime</scope>
<scope>compile</scope>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the scope change needed ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

java.xml.bind requires java.activation, so java.activation needs to be on the module-path. To get the compiler plugin to do that I needed to change to compile scope. I have updated the jpa-cdi module-info and removed the requires java.activation since this module (jpa-cdi) does not require java.activation.

@@ -28,6 +28,10 @@
<artifactId>helidon-jersey-media-jsonp</artifactId>
<name>Helidon Jersey Media JSON-P</name>

<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably not be skipped.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These modules have no source to document. They already create empty javadoc jars. They are just bundle modules. I have verified javadoc won't run with just module-info. So this skip excludes them from the aggregated javadoc.

@@ -28,6 +28,10 @@
<artifactId>helidon-jersey-server</artifactId>
<name>Helidon Jersey Server</name>

<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably not be skipped.

parent/pom.xml Outdated Show resolved Hide resolved
@barchetta barchetta changed the title First wave of javadoc fixes. Turn on failOnError Java 11 javadoc fixes. Turn on failOnError Mar 3, 2020
spericas
spericas previously approved these changes Mar 12, 2020
Copy link
Member

@spericas spericas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - metrics and FT

@barchetta barchetta dismissed stale reviews from spericas and danielkec via 33573fe March 13, 2020 16:42
@barchetta barchetta merged commit 7d500a2 into helidon-io:master Mar 13, 2020
@barchetta barchetta deleted the javadoc-fixes branch March 25, 2020 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants