I'm using the lunatech JAXRSDoclet to generate rest docs for our rest
endpoints, and I've created a custom task that works locally and on 2 other
developer's boxes, but for some reason it's failing in Jenkins.
The build script looks like:
[code]
// Add jax doclet dependencies
configurations { jaxDoclet }
dependencies { jaxDoclet 'com.lunatech.jax-doclets:doclets:0.9.0' }
// RestDocs task create javadoc-like documentation for Jax rest endpoints.
task('restdoc', group: 'Documentation', type: Javadoc,
description: 'Generates REST api docs for Jersey resources.') {
source = sourceSets.main.allJava
classpath = javadoc.classpath
destinationDir = file("${reportsDir.absolutePath}/rest-api-docs")
options.docletpath = configurations.jaxDoclet.files.asType(List)
options.doclet = 'com.lunatech.doclets.jax.jaxrs.JAXRSDoclet'
options.addStringOption('jaxrscontext', "${restEndpoint}")
}
// creates the restdoc.jar
task('restdocJar', type: Jar, dependsOn: 'restdoc') {
classifier = 'restdoc'
from restdoc.destinationDir
}
// Set up gradle to upload restdoc jars.
artifacts { archives restdocJar }
// Tell gradle to build restdoc jars when uploading to chegg repository.
uploadArchives.dependsOn restdocJar
[/code]
When it executes in Jenkins the restdoc task fails with this error:
[quote]
:user-api:restdoc
Executing task ':user-api:restdoc' due to:
No history is available for task ':user-api:restdoc'.
javadoc: error - Cannot find doclet class
com.lunatech.doclets.jax.jaxrs.JAXRSDoclet
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':user-api:restdoc'.
Cause: Javadoc generation failed.
Cause: Command '/usr/java/jdk1.6.0_14/bin/javadoc' finished with (non-zero)
exit value 1.
[/quote]
Any help would be greatly appreciated.
Thanks,
Eric
--
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Bazaar <http://bazaar.canonical.com> - Version Control for Humans