I'm trying to run Javadoc with a custom doclet from windows command line:
javadoc -classpath C:\path\to\build\dir -sourcepath C:\path\to\src\dir -doclet somePackageName.customDocletClassFileName anotherPackageName
"anotherPackageName" is the package directly under given sourcepath for which I want to produce documentation.
When I execute it like this I get the error:
javadoc: error - Cannot find doclet class somePackageName.customDocletClassFileName
It seems like there is something wrong with the -classpath flag, any ideas?
If I substitute
-doclet somePackageName.customDocletClassFileName
to
-docletpath somePackageName
it works better (although I cannot really verify the output since I have not added the testng jar to the classpath and then there's a lot of other issues).
SOLUTION:
-classpath is not used for finding doclets, instead -docletpath should be used, i.e:
javadoc -classpath C:\path\to\build\dir -docletpath C:\path\to\build\dir -sourcepath C:\path\to\src\dir -doclet somePackageName.customDocletClassFileName anotherPackageName
(Thanks to a colleague)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With