Import java code and fix pom.xml to add required dependencies