Handling errors while running pom.xml