public static Model readPom(File file) throws AnalysisException {
        Model model = null;
        final PomParser parser = new PomParser();
        try {
            model = parser.parse(file);
        } catch (PomParseException ex) {
            if (ex.getCause() instanceof SAXParseException) {
                try {
                    model = parser.parseWithoutDocTypeCleanup(file);
                } catch (PomParseException ex1) {
                    LOGGER.warn("Unable to parse pom '{}'", file.getPath());
                    LOGGER.debug("", ex1);
                    throw new AnalysisException(ex1);
                }
            }
            if (model == null) {
                LOGGER.warn("Unable to parse pom '{}'", file.getPath());
                LOGGER.debug("", ex);
                throw new AnalysisException(ex);
            }
        } catch (Throwable ex) {
            LOGGER.warn("Unexpected error during parsing of the pom '{}'", file.getPath());
            LOGGER.debug("", ex);
            throw new AnalysisException(ex);
        }
        if (model == null) {
            throw new AnalysisException(String.format("Unable to parse pom '%s'", file.getPath()));
        }
        return model;
    }
@Test
    public void testReadPom_File() throws Exception {
        File file = BaseTest.getResourceAsFile(this, "dwr-pom.xml");
        String expResult = "Direct Web Remoting";
        Model result = PomUtils.readPom(file);
        assertEquals(expResult, result.getName());

        expResult = "get ahead";
        assertEquals(expResult, result.getOrganization());
        expResult = "http://getahead.ltd.uk/dwr";
        assertEquals(expResult, result.getOrganizationUrl());

        file = BaseTest.getResourceAsFile(this, "jmockit-1.26.pom");
        expResult = "Main ø modified to test issue #710 and #801 (&amps;)";
        result = PomUtils.readPom(file);
        assertEquals(expResult, result.getName());

        file = BaseTest.getResourceAsFile(this, "pom/mailapi-1.4.3_projectcomment.pom");
        expResult = "JavaMail API jar";
        result = PomUtils.readPom(file);
        assertEquals(expResult, result.getName());
    }