From a0a65641f5509b171d86b0fa27f514570f547639 Mon Sep 17 00:00:00 2001 From: j3nsch Date: Thu, 26 Oct 2023 12:42:31 +0200 Subject: [PATCH] #1125 Use archive URL for old SOLR versions --- tests/bin/install_solr_docker.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/bin/install_solr_docker.sh b/tests/bin/install_solr_docker.sh index 99c96be49..9664a9488 100755 --- a/tests/bin/install_solr_docker.sh +++ b/tests/bin/install_solr_docker.sh @@ -26,21 +26,22 @@ while [ $# -gt 0 ]; do shift done +SOLR_VERSION="$version" + # Download Solr version if [[ "$version" =~ ^[1-8]\.[0-9]+\.[0-9]+$ ]]; then - SOLR_VERSION="$version" - ant download-solr -DsolrVersion=$SOLR_VERSION -DdownloadDir=./downloads + SOLR_URL="https://archive.apache.org/dist/lucene/solr/${solrVersion}/solr-${solrVersion}.tgz" elif [[ "$version" =~ ^(9|[1-9][0-9]+)\.[0-9]+\.[0-9]+$ ]]; then # new archive URL for versions >9.0.0 - SOLR_VERSION="$version" SOLR_URL="https://www.apache.org/dyn/closer.lua/solr/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz?action=download" - echo "Getting: $SOLR_URL" - wget -q $SOLR_URL -O - | tar -xz else echo "Unrecognized version number" echo -e "The --version option requires a 3-digit version number, e.g.: 9.4.0" exit 1 fi +echo "Getting: $SOLR_URL" +wget -q $SOLR_URL -O - | tar -xz + # Configure & start Solr cd solr-$SOLR_VERSION ./bin/solr start -force