Configure ccache directory.
diff --git a/tools/run_tests/tests.sh b/tools/run_tests/tests.sh
index 7ada81f..353ce62 100755
--- a/tools/run_tests/tests.sh
+++ b/tools/run_tests/tests.sh
@@ -103,7 +103,7 @@
 }
 
 # --batch-mode supresses download progress output that spams the logs.
-MVN=mvn --batch-mode
+MVN="mvn --batch-mode"
 
 build_java() {
   # Java build needs `protoc`.
@@ -125,7 +125,7 @@
 build_javanano() {
   # Java build needs `protoc`.
   internal_build_cpp
-  cd javanano && mvn test && cd ..
+  cd javanano && $MVN test && cd ..
 }
 
 build_java_jdk6() {