scottfrederick / springdoclet

A javadoc Doclet that generates documentation for Spring-based applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Gradle example

scottfrederick opened this issue · comments

Add an example of using SpringDoclet with Gradle.

configurations {
    springDoclet
}

dependencies {
    springDoclet files("libs/springdoclet-0.0.1-jar-with-dependencies.jar")
}

task generateRestApiDocs(type: Javadoc) {
    source = sourceSets.main.allJava
    destinationDir = reporting.file("rest-api-docs")
    options.docletpath = configurations.springDoclet.files.asType(List)
    options.doclet = "org.springdoclet.SpringDoclet"
}

The above configuration is what I used. When I run "gradle generateRestApiDocs" I get this error: javadoc: error - invalid flag: -doctitle

What is the state of this issue? Would like to use spring doclet but facing the same issue. Could http://stackoverflow.com/questions/11034326/javadoc-does-not-recognize-doctitle-option-flag/11048833#11048833 be a related issue?

I've submitted a pull request for this issue - #7. As part of the fix, I changed SpringDoclet to extend from Standard instead of Doclet to get rid of the invalid flag issue mentioned in the issue comments.

Ran tests with a SpringMVC app running on gradle and it worked fine.

Fixed in #7.