Merge war resources (#2660)
This commit is contained in:
parent
cc666f4c1b
commit
2b2bec7b74
|
|
@ -45,6 +45,8 @@ dependencies {
|
|||
testImplementation group: 'org.eclipse.jetty', name: 'jetty-webapp', version: '9.4.35.v20201120'
|
||||
}
|
||||
|
||||
def warDir = "$buildDir/testapp/war"
|
||||
|
||||
task compileGwt(dependsOn: classes, type: JavaExec) {
|
||||
// versions before 2.9 require java8
|
||||
javaLauncher = javaToolchains.launcherFor {
|
||||
|
|
@ -52,7 +54,6 @@ task compileGwt(dependsOn: classes, type: JavaExec) {
|
|||
}
|
||||
|
||||
def extraDir = "$buildDir/testapp/extra"
|
||||
def warDir = "$buildDir/testapp/war"
|
||||
|
||||
outputs.cacheIf { true }
|
||||
|
||||
|
|
@ -79,7 +80,16 @@ task compileGwt(dependsOn: classes, type: JavaExec) {
|
|||
]
|
||||
}
|
||||
|
||||
test.dependsOn sourceSets.testapp.output, compileGwt
|
||||
task copyTestWebapp(type: Copy) {
|
||||
dependsOn compileGwt
|
||||
|
||||
from file("src/testapp/webapp")
|
||||
from warDir
|
||||
|
||||
into file("$buildDir/testapp/web")
|
||||
}
|
||||
|
||||
test.dependsOn sourceSets.testapp.output, copyTestWebapp
|
||||
|
||||
test {
|
||||
// add test app classes to classpath
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class GwtTest extends AgentInstrumentationSpecification implements HttpServerTes
|
|||
Server startServer(int port) {
|
||||
WebAppContext webAppContext = new WebAppContext()
|
||||
webAppContext.setContextPath(getContextPath())
|
||||
webAppContext.setBaseResource(Resource.newResource(new File("build/testapp/war")))
|
||||
webAppContext.setBaseResource(Resource.newResource(new File("build/testapp/web")))
|
||||
|
||||
def jettyServer = new Server(port)
|
||||
jettyServer.connectors.each {
|
||||
|
|
|
|||
Loading…
Reference in New Issue