THRIFT-5068: Force secure Maven Central in Travis CI
Modify docker build scripts used in CI test environments in order to put
in place a Maven .m2/settings.xml configuration file that overrides the
repository with the id 'central' with an equivalent "mirror" that uses
https instead of http.
This closes #1988.
diff --git a/build/docker/scripts/autotools.sh b/build/docker/scripts/autotools.sh
index 8388f72..52b17ee 100755
--- a/build/docker/scripts/autotools.sh
+++ b/build/docker/scripts/autotools.sh
@@ -1,6 +1,19 @@
#!/bin/sh
set -ev
+mkdir ~/.m2
+tee >~/.m2/settings.xml <<EOF
+<settings xmlns='http://maven.apache.org/SETTINGS/1.0.0'>
+ <mirrors>
+ <mirror>
+ <id>secure-central</id>
+ <url>https://repo.maven.apache.org/maven2</url>
+ <mirrorOf>central</mirrorOf>
+ </mirror>
+ </mirrors>
+</settings>
+EOF
+
./bootstrap.sh
./configure $*
make check -j3