I want to compile javadoc for the testfx
packages.
So I get hold of the source jars and extract (testfx-core-4.0.15-alpha-sources.jar, testfx-junit-4.0.15-alpha-sources.jar).
I find that all of these packages start "org.testfx....", so put them all together ... then I go:
mike@M17A ~/Desktop/temp $ javadoc -d docs -Xmaxwarns 10 -Xdoclint:none -sourcepath . -subpackages org
It lists 100 errors of the following type:
** symbol: class TextFlow
location: class TextFlowMatchers
./org/testfx/matcher/control/TextFlowMatchers.java:157: error: cannot find symbol
private static boolean hasText(TextFlow textFlow, String string) {
**
... and then stops. No Javadoc is produced! These are (obviously) classes which are outside the packages I'm trying to document. I don't want any hyperlinks for these, just write them out linkless, please.
NB I previously used another switch, -Xmaxerrs 10
, in the command line. This simply limits the listing of errors to 10, but again the Javadoc itself is not produced.
This technique used to work. I have just upgraded (?) to Java 11. This appears to be new to Java 11. Anyone know how to overcome this nonsense?
later, in response to Slaw
I very much like to have local copies of reference documents of all the modules and frameworks and so on that I use, in all languages. I didn't know about the links to the online Javadoc. I could possibly use HTTrack to copy that particular website and make a local copy.
I did try the other route: cloning the git repo and running ./gradlew aggregateJavadoc
. Unfortunately this failed:
mike@M17A ~/Desktop/temp2/TestFX $ ./gradlew aggregateJavadoc
> Task :aggregateJavadoc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':aggregateJavadoc'.
> /home/mike/Desktop/temp2/TestFX/docs/javadoc does not exist
... before you ask, yes I tried creating a /javadoc folder there, but the task deleted it before then complaining again that it didn't exist!
I also tried the simple javadoc
task. This also failed:
mike@M17A ~/Desktop/temp2/TestFX $ ./gradlew javadoc
> Task :testfx-core:compileModuleInfoJava
/home/mike/Desktop/temp2/TestFX/subprojects/testfx-core/src/main/java/module-info.java:37:
warning: requires transitive directive for an automatic module
requires transitive org.hamcrest;
^
1 warning
> Task :testfx-core:javadoc FAILED
/home/mike/Desktop/temp2/TestFX/subprojects/testfx-core/src/main/java/module-info.java:36:
error: module not found: org.assertj.core
requires static org.assertj.core;
^
1 error
workaround
Fortunately I have managed to enlist the support of my Java 8 installation, which is still on my system, in my case: /usr/lib/jvm/java-8-openjdk-amd64/javadoc. Obviously I'll set up a symlink. Added benefit of using Java 8: I personally rather like the "frames" version of the Javadocs, i.e. with the packages and classes listed in the left-hand frames.
Conclusion
What could have led the brilliant people (not irony) behind Java to have modified things like this? I have looked quite carefully at the available switches and options for javadoc v. 11. Nothing enables you to make a simple, er, Javadoc, which in my naivety I had assumed was the purpose of the javadoc utility.