You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2020/02/17 15:47:37 UTC

[lucene-solr] branch jira/LUCENE-9220 updated: LUCENE-9220: use more robust download (in case of kill -9 or jvm crash)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch jira/LUCENE-9220
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/jira/LUCENE-9220 by this push:
     new 86e2c83  LUCENE-9220: use more robust download (in case of kill -9 or jvm crash)
86e2c83 is described below

commit 86e2c8311c1255779c6c0b29c4c25488738088c0
Author: Robert Muir <rm...@apache.org>
AuthorDate: Mon Feb 17 10:47:38 2020 -0500

    LUCENE-9220: use more robust download (in case of kill -9 or jvm crash)
---
 gradle/generation/snowball.gradle | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gradle/generation/snowball.gradle b/gradle/generation/snowball.gradle
index bac75aa..a783623 100644
--- a/gradle/generation/snowball.gradle
+++ b/gradle/generation/snowball.gradle
@@ -38,11 +38,8 @@ configure(project(":lucene:analysis:common")) {
     snowballWorkDir    = file("${buildDir}/snowball")
 
     snowballStemmerDir = file("${snowballWorkDir}/stemmers-${snowballStemmerCommit}")
-    snowballStemmerZip = file("${snowballStemmerDir}.zip")
     snowballWebsiteDir = file("${snowballWorkDir}/website-${snowballWebsiteCommit}")
-    snowballWebsiteZip = file("${snowballWebsiteDir}.zip")
     snowballDataDir    = file("${snowballWorkDir}/data-${snowballDataCommit}")
-    snowballDataZip    = file("${snowballDataDir}.zip")
 
     snowballPatchFile  = rootProject.file("gradle/generation/snowball.patch")
     snowballScript     = rootProject.file("gradle/generation/snowball.sh")
@@ -52,8 +49,10 @@ configure(project(":lucene:analysis:common")) {
   task downloadSnowballStemmers(type: Download) {
     inputs.file(snowballPatchFile)
     src "https://github.com/snowballstem/snowball/archive/${snowballStemmerCommit}.zip"
+    def snowballStemmerZip = file("${snowballStemmerDir}.zip")
     dest snowballStemmerZip
     overwrite false
+    tempAndMove true
 
     doLast {
       ant.unzip(src: snowballStemmerZip, dest: snowballStemmerDir, overwrite: "true") {
@@ -66,8 +65,10 @@ configure(project(":lucene:analysis:common")) {
   // downloads snowball website (or use cached copy)
   task downloadSnowballWebsite(type: Download) {
     src "https://github.com/snowballstem/snowball-website/archive/${snowballWebsiteCommit}.zip"
+    def snowballWebsiteZip = file("${snowballWebsiteDir}.zip")
     dest snowballWebsiteZip
     overwrite false
+    tempAndMove true
 
     doLast {
       ant.unzip(src: snowballWebsiteZip, dest: snowballWebsiteDir, overwrite: "true") {
@@ -79,8 +80,10 @@ configure(project(":lucene:analysis:common")) {
   // downloads snowball test data (or use cached copy)
   task downloadSnowballData(type: Download) {
     src "https://github.com/snowballstem/snowball-data/archive/${snowballDataCommit}.zip"
+    def snowballDataZip = file("${snowballDataDir}.zip")
     dest snowballDataZip
     overwrite false
+    tempAndMove true
 
     doLast {
       ant.unzip(src: snowballDataZip, dest: snowballDataDir, overwrite: "true") {