apply plugin: 'org.gretty'
test {
include '**/Test*.*'
include '**/*Test.*'
exclude '**/*IT.*'
}
task integrationTest(type: Test, dependsOn: 'test') {
outputs.upToDateWhen { false }
include '**/*IT.*'
// we explain to integrationTest that contextPath under test is "helloGretty", not this project
ext.contextPath = 'helloGretty'
}
farm {
// we serve helloGretty.war under http://localhost:8080/helloGretty
webapp 'helloGretty.war'
// we run integration tests of this project
webapp project
// this is needed only if WAR-file is generated in the same project tree
// afterEvaluate {
// project.tasks.farmBeforeIntegrationTest.dependsOn ':helloGretty:build'
// }
}