More general version of pom that works with all branches.