On 10/20/2011 02:07 PM, Adam Murdoch wrote:
> 
> On 21/10/2011, at 3:19 AM, David Kowis wrote:
> 
>> I've got a project that I'm trying to convert from maven to gradle, and
>> for the most part it's going well. I'm generating sources using
>> wsimport's ant task, and adding them to the various groovy and java
>> compile targets:
>> <paste>
>> task wsimport(dependsOn: processResources) {
>>  generatedDir = "src/generated/java"
>>  new File(generatedDir).mkdirs()
>>
>> doLast {
>>   ant.taskdef(name:'wsimport',
>> classname:'com.sun.tools.ws.ant.WsImport',
>> classpath:configurations.jaxws.asPath)
>>     ant.wsimport( keep:true,
>>         target: "2.1",
>>         sourceDestDir: "$generatedDir",
>>         package: "com.imasample.somesoapservice",
>>         wsdl: "$projectDir/src/main/wsdl/tehWSDL.wsdl"
>>         )
>> }
>> }
>>
>> compileJava {
>>  dependsOn wsimport
>>  source wsimport.generatedDir
>> }
>> compileTestJava {
>>  dependsOn wsimport
>>  source wsimport.generatedDir
>> }
>> compileTestGroovy {
>>  dependsOn wsimport
>>  source wsimport.generatedDir
>> }
> 
> 
> What you're doing here should work, ie calling source(someDir) should
> just add the directory to the set of source for the given compile task.
> However, it looks like the compile tasks are throwing away their default
> source when you do this, so that only the generated source is compiled.
>  This is a bug. Could you add a jira issue for this?

Done, thanks: http://issues.gradle.org/browse/GRADLE-1857

David

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to