On 08/03/2011, at 11:28 AM, Neil Chaudhuri wrote:
> I am using a third-party tool to generate PDF Javadocs, and although I am
> using all the proper flags, javadoc is telling me via AntBuilder that they
> are not. Here is my task:
>
> task generatePdfJavadoc(dependsOn: [configurations.pdfDoclet, clean]) << {
> ant.javadoc(
> classpath: configurations.compile.asPath,
> sourcepath: file("src${File.separator}main${File.separator}java"),
> destdir: "${docsDir.absolutePath}${File.separator}pdf",
> docletpath: configurations.pdfDoclet.asPath,
> doclet: "com.tarsec.javadoc.pdfdoclet.PDFDoclet",
> Windowtitle: "${project.name}-api",
> Doctitle: "${project.name}-api" ,
> Footer: "Generated ${new Date().dateTimeString}"
> )
> }
>
> When I run, I get this the following logs:
>
> 19:16:33.921 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] OPTION: -d
> 19:16:33.921 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] usage: javadoc [options] [packagenames] [sourcefiles] [@files]
> 19:16:33.921 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] -overview <file> Read overview documentation from HTML
> file
> 19:16:33.921 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] -public Show only public classes and members
> 19:16:33.937 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] javadoc: error - invalid flag: -d
> 19:16:33.921 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] javadoc: error - invalid flag: -d
> 19:16:33.968 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] -protected Show protected/public classes and
> members (default)
> 19:16:33.968 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] -protected Show protected/public classes and
> members (default)
> …
> 19:16:33.984 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc]
> 19:16:33.984 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] OPTION: -help
> 19:16:33.984 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> [ant:javadoc] 1 error
>
> As you know –d is a proper javadoc flag for specifying the destination
> directory. When I remove destdir, I still find the same for –windowtitle,
> –doctitle, and -footer. When I remove all four, the task works perfectly.
Those 4 options are options provided by the standard doclet. They won't work
when you use a custom doclet.
See:
http://download.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#standard
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
Co-Founder and VP of Engineering, Gradleware Inc. - Gradle Training, Support,
Consulting
http://www.gradleware.com