Backport from flatter: java6 and compatible maven.