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_String_File() throws Exception {
        File fileCommonValidator = BaseTest.getResourceAsFile(this, "commons-validator-1.4.0.jar");
        JarFile jar = new JarFile(fileCommonValidator, false);
        String expResult = "Commons Validator";
        Model result = PomUtils.readPom("META-INF/maven/commons-validator/commons-validator/pom.xml", jar);
        assertEquals(expResult, result.getName());
    }