Use a local Maven repository to avoid network fetches during tests.
diff --git a/tools/run_tests/tests.sh b/tools/run_tests/tests.sh
index 4b2aef7..c28a5da 100755
--- a/tools/run_tests/tests.sh
+++ b/tools/run_tests/tests.sh
@@ -104,6 +104,11 @@
       ;;
   esac
 
+  if [ "$TRAVIS" != "true" ]; then
+    MAVEN_LOCAL_REPOSITORY=/var/maven_local_repository
+    MVN="$MVN -e -X --offline -Dmaven.repo.local=$MAVEN_LOCAL_REPOSITORY"
+  fi;
+
   which java
   java -version
 }