Incidentally, when I replace the sourcepath entry in my original configuration 
with this:

sourcepathref: sourceSets.main.java.asPath

Then I get "Cause: Reference <all the .java source files separated by 
semicolons> not found.

Again, any insight is appreciated.

Thanks.

From: Neil Chaudhuri [mailto:[email protected]]
Sent: Monday, March 07, 2011 2:13 PM
To: [email protected]
Subject: [gradle-user] Classpath for Javadoc Task with AntBuilder

I am using AntBuilder in Gradle to run a third-party Javadoc doclet, but I get 
an error saying "Caused by: Reference <all the jar files in my classpath like 
Spring, etc. separated by semicolons> not found."

Here are the relevant snippets:

configurations {
  jaxDoclet { extendsFrom compile }
}

dependencies {
  compile group: springFrameworkGroup, name: "spring-web", version: 
springFrameworkVersion
.
.
.
  jaxDoclet group: "com.lunatech.doclets", name: "jax-doclets", version: "0.7"
}

task generateRestApiDocs(dependsOn: configurations.jaxDoclet) << {
  ant.javadoc(
          classpathref: configurations.jaxDoclet.asPath,
          sourcepath: file("src${File.separator}main${File.separator}java"),
          destdir: "${reportsDirName}${File.separator}rest-api-docs",
          docletpathref: configurations.jaxDoclet.asPath) {
    doclet(name: "com.lunatech.doclets.jax.jaxrs.JAXRSDoclet") {
      param name:"-jaxrscontext", value:"http://localhost:8080/"; + webContext
    }
  }
}

Can you please provide insight into how I should adjust my configuration to get 
this to work? On a far less important note, it would be nice to know if there 
is a more elegant way to specify that my sourcepath is "src/main/java."

Thanks.

Reply via email to