Search code examples
javadocgradledoclet

Gradle javadoc doclets. Can not find doclet


I am new to Gradle, and I am trying to use my very-own-and-beauty doclet with gradle. I have made the next task:

task myDoclet(type: Javadoc, dependsOn: myJavadocs) {
source = sourceSets.main.allJava
options.doclet = "com.myproject.webservice.doclets.Doclet2"
classpath = configurations.compile  }

With that, I become always the next error:

javadoc: error - Cannot find doclet class com.myproject.webservice.doclets.Doclet2

I know that there is a options.docletpath , that should be the path to my doclet (but... src or class?), but I am not able to understand what should I put there, due to the lack of explanations in the docu

Can anyone explain me how can I set correctly the doclet's path, so it finds my pretty doclet?

Thanks for your time!!


Solution

  • The docletpath specifies the path to the doclet starting class file. This can be a path to a jar (that contains the class file) or point to a directory where the class file is located. Have a look at the javadoc documentation about the doclet classpath at http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#docletpath

    hope that helps, regards, René