Search code examples
javamavenjavadocmaven-javadoc-plugin

An error has occurred in Javadoc report generation - unknown tag


I'm trying to generate the javadoc through maven by doing this mvn javadoc:javadoc javadoc:aggregate and here is the error

Thats my function where the problem is:

/** Divide 2 int
* @param a int
* @param b int
* @return a / b if b != 0
* @throw IllegalArgumentException if b == 0
*/
public static int division(final int a, final int b) {
  if (b == 0) {
   throw new IllegalArgumentException("b must be equal to 0");
  }
  return a / b;
}

Thats not my code, it is for a school project.

Cordially


Solution

  • Agreeing with the comments of @dehasi I additionally just want to point you to a tag-specific section of deeper explanation in an Oracle article about How to Write Doc Comments for the Javadoc Tool.

    It covers the well-known tags, their recommended order as well as cardinalities, semantics and if applicable their equivalent synonyms.