Add JAVA_HOME for maven.
Improve maven_cache_test debuggability.
Fixed maven cache tests (a package's domain changed).