Does the incremental build not work for the 2nd pass, or all subsequent passes? You might be encountering http://issues.gradle.org/browse/GRADLE-1110
I've worked around it in some places by simply manually creating the target directory in the configuration phase, which in your case would simply be: mkdir generatedWsdlDir Also, I explicitly use outputs.dir instead of outputs.files (not sure that matters, but worth a try). So you'd use: outputs.dir generatedWsdlDir I'm explicitly using a ProcessBuilder instead of the JavaExec task usually, so my "real" task is just the default task type. I'm not aware of anything special that JavaExec might be doing with the inputs and outputs for up-to-date checking, but I haven't dug into the code for that task. The only other thing that looks like it could appear to "change" between runs is the configurations.cxfCodeGenLibs, as it isn't shown in your snippet how that gets setup. I'm assuming wsdlFile and jaxbBindingsFile are just simple file objects. inputs.files configurations.cxfCodeGenLibs, wsdlFile, jaxbBindingsFile -Spencer --- On Fri, 4/15/11, Magnus Rundberget <[email protected]> wrote: From: Magnus Rundberget <[email protected]> Subject: RE: [gradle-user] javaexec task type and inputs.files outputs.files To: [email protected] Date: Friday, April 15, 2011, 6:07 AM I'm using cxf 2.3 and as indicated on the page from the link, the ant tasks are not part of 2.3. Anyways the problem isn't that the task isn't working. Its actually working fine. My issue was with the incremental build feature of gradle (inputs and outputs) when using a JavaExec task. To me it seems no input/output checking is done when using this task type. I could easily rewrite my task as a custom task with inputs/outputs and a doLast block, but I'd rather not unless I have to :-) cheersMagnus Date: Fri, 15 Apr 2011 11:43:57 +0300 From: [email protected] To: [email protected] Subject: Re: [gradle-user] javaexec task type and inputs.files outputs.files I would try to use the ant tasks http://cxf.apache.org/docs/ant-tasks-20x-and-21x.html Ronen On Fri, Apr 15, 2011 at 11:31 AM, Magnus Rundberget <[email protected]> wrote: Hi, I've created a task for generating java source files from a wsdl. JavaExec seemed appropriate but I'm struggling to get the incremental build feature to work task wsdl2Java(type: JavaExec) { inputs.files configurations.cxfCodeGenLibs, wsdlFile, jaxbBindingsFile outputs.files generatedWsdlDir main = 'org.apache.cxf.tools.wsdlto.WSDLToJava' classpath = configurations.cxfCodeGenLibs args '-b', jaxbBindingsFile, '-d', generatedWsdlDir, '-xjc-Xts', wsdlFile } should this work ? ... or am I missing something obvious ? cheersMagnus
