For some reason after the upgrade to Gradle, the core.jar file is no (#1730)

longer included in the generated WAR, even though the deploy_jar
configuration is specified as a dependency.

I could not figure out a way to tweak the configuration dependency to
have core.jar pulled into the .war, so I decided to just explicitly pick
it from its known location.

TESTED=deployed to alpha and verified that the instances can start.
This commit is contained in:
Lai Jiang 2022-08-03 10:26:44 -04:00 committed by GitHub
parent 3e420071c1
commit a04420c873

View file

@ -26,6 +26,7 @@ project.convention.plugins['war'].webAppDirName =
apply plugin: 'com.google.cloud.tools.appengine' apply plugin: 'com.google.cloud.tools.appengine'
def coreResourcesDir = "${rootDir}/core/build/resources/main" def coreResourcesDir = "${rootDir}/core/build/resources/main"
def coreLibsDir = "${rootDir}/core/build/libs"
// Get the web.xml file for the service. // Get the web.xml file for the service.
war { war {
@ -38,6 +39,10 @@ war {
from("${coreResourcesDir}/google/registry/ui/html") { from("${coreResourcesDir}/google/registry/ui/html") {
include "*.html" include "*.html"
} }
from("${coreLibsDir}") {
include "core.jar"
into("WEB-INF/lib")
}
} }
if (project.path == ":services:default") { if (project.path == ":services:default") {
@ -98,6 +103,7 @@ rootProject.deploy.dependsOn appengineDeployAll
rootProject.stage.dependsOn appengineStage rootProject.stage.dependsOn appengineStage
tasks['war'].dependsOn ':core:compileProdJS' tasks['war'].dependsOn ':core:compileProdJS'
tasks['war'].dependsOn ':core:processResources' tasks['war'].dependsOn ':core:processResources'
tasks['war'].dependsOn ':core:jar'
// Impose verification for all of the deployment tasks. We haven't found a // Impose verification for all of the deployment tasks. We haven't found a
// better way to do this other than to apply to each of them independently. // better way to do this other than to apply to each of them independently.