I was able to figure out the issue, but I'm not sure why it is an issue. The issue was that we have had many issues with SNAPSHOT versions, so we created a 'clearCaches' task that basically deletes the .m2/repository, and .gradle/cache directory.
It appears that combining the clearCaches, clean, and assemble tasks all on a single command-line causes the JAXRSDoclet to be not found, even though I could clearly see it being downloaded during the assemble task's run. By splitting the build step up into two steps in Jenkins I was able to solve the issue. I have one build step that does the clearCaches and clean, and a second step that does the assemble. I'm really not sure why this is an issue though, especially since I do see the JAXRSDoclet dependency being downloaded for the assemble task. Any ideas? Thanks, Eric On Thu, Jul 7, 2011 at 3:13 PM, Eric Berry <[email protected]> wrote: > Was discussing in IRC with Rene. > > I've uploaded the stacktrace to pastebin: > http://pastebin.com/GSFLCUWh > > Thanks, > Eric > > > On Thu, Jul 7, 2011 at 2:25 PM, Eric Berry <[email protected]> wrote: > >> 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 > -- 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
