javajavadocmaven-javadoc-plugin

Cannot run javadoc from console at java 10


I'm trying to get javadocs for my classes directly from console with following code javadoc -sourcepath ./src/main java.packageName. Those classes have dependencies on external libraries (e.g junit.framework). This code is easy to compile from IntelliJ IDEA or via mvn clean install, but when I'm trying to create javadocs I face the problem that external classes and packages cannot be recognized (e.g. error: package junit.framework does not exist). Same problem occurs with JDK 8 as well, but there those are warnings and javadocs are generated anyway.


Solution

  • There are two approaches you could take to get the javadocs to build from the command line:

    I suspect that there are a couple of reasons why your current attempt is failing: