private SiteModel readSiteModel()

in doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java [1088:1108]


    private SiteModel readSiteModel(String siteDescriptorContent, MavenProject project, Locale locale)
            throws SiteToolException {
        try {
            if (project != null && isOldSiteModel(siteDescriptorContent)) {
                LOGGER.warn(
                        "Site model of '" + project.getId() + "' for "
                                + (locale.equals(SiteTool.DEFAULT_LOCALE)
                                        ? "default locale"
                                        : "locale '" + locale + "'")
                                + " is still using the old pre-version 2.0.0 model. You MUST migrate to the new model as soon as possible otherwise your build will break in the future!");
                return convertOldToNewSiteModel(
                        new DecorationXpp3Reader().read(new StringReader(siteDescriptorContent)));
            } else {
                return new SiteXpp3Reader().read(new StringReader(siteDescriptorContent));
            }
        } catch (XmlPullParserException e) {
            throw new SiteToolException("Error parsing site descriptor", e);
        } catch (IOException e) {
            throw new SiteToolException("Error reading site descriptor", e);
        }
    }