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.