Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I suppress warnings (codebase-wide) during javadoc compilation?

I'm stuck with a legacy Java codebase that has THOUSANDS of warnings when you compile it. I would love to actually fix the source of all these warnings, but unfortunately that's not an option at this time at my company (other things like "making new products that generate revenue" are considered higher priority by the people in charge; fancy that).

Now, I could just live with all of these warnings, if it wasn't for the fact that they make it difficult to find actual errors in the output from our continuous build server. The build server just uses an ant call, nothing fancy, but so far I haven't been able to find anything anywhere for how I can modify this call to prevent warning output.

Going through the code and adding a @SuppressWarnings annotation everywhere would work, but it would also be almost as much of a pain as going through and fixing all the warnings' sources. So what I'd really love is if there was just some way I could do:

<javadoc suppressWarrnings="true"

or something similar, to make the javadoc compiler not output all the warning messages. Is anything like this (global javadoc warning disabling) possible?

like image 870
machineghost Avatar asked Mar 06 '09 22:03

machineghost


1 Answers

In Java 8 you can add additionalparam="-Xdoclint:none" to the javadoc task. (Source)

like image 103
Robert Tupelo-Schneck Avatar answered Sep 18 '22 19:09

Robert Tupelo-Schneck