Hi Neil,
the following snippet should do the trick:
task integrationTest(type: Test, dependsOn: jar) {
testClassesDir = sourceSets.test.classesDir
classpath = sourceSets.test.runtimeClasspath
includes = ["**/*IT.class"]
}
regards,
René
Am Mo, 7.02.2011, 18:02, schrieb Neil Chaudhuri:
> My project is in the archetypal Maven layout, and I am writing a task to
> run only integration tests, which in my case are distinguished by the
> fact they all end in "IT." I have devised the following to accomplish
> this:
>
>
> task runIntegrationTests(dependsOn: [compile, compileTest]) << { println
> "In task"
> FileTree integrationTests = fileTree {
> from "src/test" include "**/*IT.class" }
>
>
> integrationTests.each { test { it } }
> }
>
>
> However, this isn't working. I have two questions: 1) How can I rewrite
> this task to test all my integration tests only? And 2) How can I avoid
> hardcoding the test source directory? Values I have tried like
> project.sourceSets["test"] haven't worked.
>
> Thanks.
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email