Fix DEVKIT-839. Add XML error check for pom file

Simple check syntax and parse the pom to avoid trying to run maven builds with malformed poms.