private void writeBody()

in maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java [160:228]


    private void writeBody(MojoDescriptor mojoDescriptor, XMLWriter w) {
        w.startElement("document");
        w.addAttribute("xmlns", "http://maven.apache.org/XDOC/2.0");
        w.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
        w.addAttribute(
                "xsi:schemaLocation", "http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd");

        // ----------------------------------------------------------------------
        //
        // ----------------------------------------------------------------------

        w.startElement("properties");

        w.startElement("title");
        w.writeText(mojoDescriptor.getFullGoalName());
        w.endElement(); // title

        w.endElement(); // properties

        // ----------------------------------------------------------------------
        //
        // ----------------------------------------------------------------------

        w.startElement("body");

        w.startElement("section");

        w.addAttribute("name", mojoDescriptor.getFullGoalName());

        writeReportNotice(mojoDescriptor, w);

        w.startElement("p");
        w.writeMarkup(getString("pluginxdoc.mojodescriptor.fullname"));
        w.endElement(); // p
        w.startElement("p");
        w.writeMarkup(mojoDescriptor.getPluginDescriptor().getId() + ":" + mojoDescriptor.getGoal());
        w.endElement(); // p

        String context = "goal " + mojoDescriptor.getGoal();
        if (StringUtils.isNotEmpty(mojoDescriptor.getDeprecated())) {
            w.startElement("p");
            w.writeMarkup(getString("pluginxdoc.mojodescriptor.deprecated"));
            w.endElement(); // p
            w.startElement("div");
            w.writeMarkup(getXhtmlWithValidatedLinks(mojoDescriptor.getDeprecated(), context));
            w.endElement(); // div
        }

        w.startElement("p");
        w.writeMarkup(getString("pluginxdoc.description"));
        w.endElement(); // p
        w.startElement("div");
        if (StringUtils.isNotEmpty(mojoDescriptor.getDescription())) {
            w.writeMarkup(getXhtmlWithValidatedLinks(mojoDescriptor.getDescription(), context));
        } else {
            w.writeText(getString("pluginxdoc.nodescription"));
        }
        w.endElement(); // div

        writeGoalAttributes(mojoDescriptor, w);

        writeGoalParameterTable(mojoDescriptor, w);

        w.endElement(); // section

        w.endElement(); // body

        w.endElement(); // document
    }