LP1858344 Make curl follow redirects to retrieve lib/json-20160810.jar
authorDan Scott <dan@coffeecode.net>
Sun, 5 Jan 2020 16:59:36 +0000 (11:59 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 6 Jan 2020 21:52:31 +0000 (16:52 -0500)
Maven redirects some requests to other servers, but unless curl is told
to follow redirects using the -L/--location flag, it will simply
download the HTML response for the HTTP 301 "Moved permanently" message,
breaking the ability to compile Hatch.

This commit adds the "-L" flag to the curl request for
lib/json-20160810.jar, resolving the issue.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
fetch-deps.sh

index 8c23599..3daf3ba 100755 (executable)
@@ -112,7 +112,7 @@ fi;
 mkdir -p lib
 if [ ! -f lib/$JSON_JAR ]; then
     echo "Fetching JSON libs..."
-    curl -o lib/$JSON_JAR $JSON_URL
+    curl -L -o lib/$JSON_JAR $JSON_URL
 fi;
 
 rm -rf "$JDK_DIR_SHORT" "$JFX_DIR_SHORT";