SEC-2622: Set classesDirectory if exists for integrationTomcatRun

This commit is contained in:
Rob Winch 2014-06-13 12:22:01 -05:00
parent 6964c2e3de
commit ec1c5b0e78

View File

@ -21,14 +21,16 @@ dependencies {
task integrationTomcatRun(type: org.gradle.api.plugins.tomcat.tasks.TomcatRun) {
onlyIf { !sourceSets.integrationTest.allSource.empty }
buildscriptClasspath = tomcatRun.buildscriptClasspath
classesDirectory = project.sourceSets.main.output.classesDir
contextPath = tomcatRun.contextPath
daemon = true
tomcatClasspath = tomcatRun.tomcatClasspath
webAppClasspath = tomcatRun.webAppClasspath
webAppSourceDirectory = tomcatRun.webAppSourceDirectory
doFirst {
def mainOutputDir = project.sourceSets.main.output.classesDir
if(mainOutputDir) {
classesDirectory = mainOutputDir
}
// delay reserving ports to ensure they are still available
def ports = reservePorts(3)
httpPort = ports[0]