From e4acb763209bcca5edd97c01d877f2fa65ec152c Mon Sep 17 00:00:00 2001 From: Michael Muller Date: Fri, 20 Sep 2019 16:23:36 -0400 Subject: [PATCH] Add work-around for our "explode war" failure (#279) For some reason tools.jar (which we don't need in the runtime in the first place) gets exploded readonly, causing subsequent builds to fail since they can't overwrite it. This hack makes it writable at the end of explodeWar. --- appengine_war.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/appengine_war.gradle b/appengine_war.gradle index 4a8214c36..9f776e974 100644 --- a/appengine_war.gradle +++ b/appengine_war.gradle @@ -76,6 +76,20 @@ dependencies { compile project(':core') } +// The tools.jar file gets pulled in from the java environment and for some +// reason gets exploded "readonly", causing subsequent builds to fail when +// they can't overwrite it. The hack below makes the file writable after +// we're done exploding it. +// +// Fun fact: We only use this jar for documentation generation and as such we +// don't need it in our warfile, as it is not used by the application at +// runtime. But it's not clear how to exclude it, as we seem to be +// constructing the jar from the entire WEB-INF directory and per-file +// exclude rules don't seem to work on it. Better solutions are welcome :-) +explodeWar.doLast { + file("${it.explodedAppDirectory}/WEB-INF/lib/tools.jar").setWritable(true) +} + rootProject.deploy.dependsOn appengineDeployAll rootProject.stage.dependsOn appengineStage appengineDeployAll.dependsOn rootProject.verifyDeployment