On 15/04/2011, at 6:31 PM, Magnus Rundberget 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 ?
JavaExec marks itself as always out-of-date in its constructor. So, any inputs
and outputs you declare are ignored for the purpose of incremental build.
They're still used for dependency auto-wiring.
Could you add a jira issue for this problem?
Here's a work around:
task wsdl2Java(type: JavaExec) {
outputs.upToDateSpec = new org.gradle.api.specs.AndSpec()
....
}
--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com