4

My github release workflow includes the maven-javadoc-plugin. This plugin emits a large number of warnings, but when I look at the messages, none of them is the slightest bit worrisome; they are all just diagnostic messages.

It is as if some n00b is using a warning-level logging statement to emit debug-level or trace-level messages:

Warning: ARNING] Javadoc Warnings
Warning: ARNING] Loading source files for package io.github.mikenakis.bathyscaphe...
Warning: ARNING] Loading source files for package io.github.mikenakis.bathyscaphe.annotations...
Warning: ARNING] Constructing Javadoc information...
Warning: ARNING] Building index for all the packages and classes...
Warning: ARNING] Standard Doclet version 17.0.3+7-LTS
Warning: ARNING] Building tree for all the packages and classes...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/ImmutabilitySelfAssessable.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/Invariable.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/InvariableArray.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/ThreadSafe.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/package-summary.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/package-tree.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/package-summary.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/package-tree.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/class-use/ImmutabilitySelfAssessable.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/class-use/Invariable.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/class-use/InvariableArray.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/class-use/ThreadSafe.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/package-use.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/io/github/mikenakis/bathyscaphe/annotations/package-use.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/overview-tree.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/index.html...
Warning: ARNING] Building index for all classes...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/allclasses-index.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/allpackages-index.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/index-all.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/overview-summary.html...
Warning: ARNING] Generating /home/runner/work/Bathyscaphe/Bathyscaphe/target/checkout/claims/target/apidocs/help-doc.html...

Note that a google search for the keywords related to my question yields many results, but every single one of them is about situations where people are receiving legitimate warnings from maven-javadoc-plugin, or even errors, and they are asking how they can have them suppressed.

This is not my problem; my javadoc generates no warnings; but the tool keeps using the warning level when issuing messages that are obviously informational.

So, why is this happening, and how can I prevent it from happening?

Also, while at it: does anyone know why the leading "[W" is missing from each line? (And how come "Warning: " is prepended to each line?)

Mike Nakis
  • 56,297
  • 11
  • 110
  • 142
  • 1
    Please check the version of maven-javadoc-plugin which you are using (https://maven.apache.org/plugins/) and upgrade to the most recent first... – khmarbaise May 25 '22 at 06:35
  • @khmarbaise sorry for the late reply; this issue was kind of secondary so I was not paying much attention to it, and now quite some time has passed; if I remember correctly, using the latest version fixed the problem. If you create an answer, and when I get around to verify this, I will accept it. – Mike Nakis Oct 27 '22 at 11:28

1 Answers1

1

You can avoid the informational messages from javadoc by adding quiet=true:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-javadoc-plugin</artifactId>
   <configuration>
      <quiet>true</quiet>
   </configuration>
</plugin>

There is also a bug that complains about the new javadoc behaviour with a small discussion how to handle that in the maven-javadoc-plugin: https://bugs.openjdk.org/browse/JDK-8270831

Uli
  • 1,390
  • 1
  • 14
  • 28