I am creating a custom doclet that I want to run in my Maven build with the Javadoc plugin, but right now I'd like to test / debug the Doclet in Eclipse. How can I do that?
Do I have to invoke javadoc programmatically? And how?
I am creating a custom doclet that I want to run in my Maven build with the Javadoc plugin, but right now I'd like to test / debug the Doclet in Eclipse. How can I do that?
Do I have to invoke javadoc programmatically? And how?
If you are running JDK v1.8, you may need to use the following code snippet:
where
docletFqcn
is the fully qualified class name of your Doclet class andjavaSourceFilePath
the location of the Java file to process.I got error message with @Jan answer
After change to these code and it work well
you can simply create a main method in your doclet and call (example, see full cmdling reference):
That also works with the debugger.
You might also have to add the -classpath parameter containing all jar dependencies needed to parse the actual code.