Prerequisites: install Java SE 8, Git and Maven. You may need to set your JAVA_HOME.
JAVA_HOME
git clone https://github.com/googleapis/google-http-java-client.git cd google-http-java-client mvn install