Updates Java and pom.xml snippets