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? > </paste> > > Now, besides that and dependencies, I have not done anything fancy. > > My problem lies in that gradle is not running any of our unit tests. > We've got mostly groovy tests, most in Spock. > It's not running any of them, not even the java ones > > I'm really confused as to why this fails. > > gradle clean test -d output: http://www.pastie.org/2730546 > cut to be where it starts to execute the test task. > > This has got to be something stupidly simple, but I am unable to find a > solution after several hours of gewgling. Maybe I'm hunting for the > wrong words... > > Thanks for any assistance, > David > -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com