Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven-javadoc-plugin generates warning about generating every file. Why/what is it?

Having default maven-javadoc-plugin configuration:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <executions>
    <execution>
      <id>attach-javadocs</id>
      <goals>
        <goal>jar</goal>
      </goals>
      <configuration> <!-- add this to disable checking -->
        <doclint>none</doclint>
        <quiet>true</quiet>
      </configuration>
    </execution>
  </executions>
</plugin>

Generates immense warnings, and I have no idea what does it complain about, of even if it's complaining about something.

[WARNING] Javadoc Warnings
[WARNING] Loading source files for package net.homecredit.ofs...
...
[WARNING] Constructing Javadoc information...
[WARNING] Building index for all the packages and classes...
[WARNING] Standard Doclet version 18+37
[WARNING] Building tree for all the packages and classes...
[WARNING] Generating classX.html...
[WARNING] Generating classY.html...
... remaining several thousands warnings.

what is it? How to turn this off? ~I need not to be alarmed, that javadoc is processing stuff in my packages or that it generates javadoc about each class, I'd kinda expect it to do it, and silently. Maybe I have misconfiguration somewhere (where?), but there is no indication of any error and it looks more like trace logging, than actual warnings.

EDIT: removing <doclint>none</doclint> will turn warnings to errors with some actual complaints, like "there you forgot to specify documentation for parameter id" or "this trivial class does not have comment". I tried to search documentation, I saw it once somewhere, but I cannot find it anywhere now. How would look configuration: "do not check anything, I don't care. Just print what was written into javadocs and don't even think about what it is."?

like image 898
Martin Mucha Avatar asked Jan 26 '26 14:01

Martin Mucha


1 Answers

This seems to do the trick.

<configuration>
  <doclint>-html,-syntax,-accessibility,-missing</doclint>
  <failOnError>false</failOnError>
  <quiet>true</quiet>
</configuration>
like image 165
Martin Mucha Avatar answered Jan 28 '26 12:01

Martin Mucha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!