开发者

How do I get my custom Maven Reporting Plugin to appear under the Project Reports in the generated site?

I have written a new maven reporting plugin and it executes when the site is generated an开发者_如何学Cd produces and output html file.

How do i get the Project Reports section of the site to contain a link to it?


As a workaround you could manually re-define the project reports section in a custom site.xml:

    <!-- Inherit this menu for sub modules. -->
    <menu name="Module Documentation" inherit="top" >
        <item name="Overview" href="index.html" >
        </item>

        <item name="Information" href="project-info.html" >
            <item name="Dependencies" href="dependencies.html" />
            <item name="Project Plugins" href="plugins.html" />
            <item name="Project Summmary" href="project-summary.html" />
            ...
        </item>

        <item name="Reports" href="project-reports.html" >
            <item name="Checkstyle" href="checkstyle.html" />
            <item name="Your Report" href="your-report.html" />
            ...
        </item>
    </menu>

The drawbacks are:

  • You have to specify every single report.
  • You have to provide project-reports.html as well (e.g. via project-reports.apt) and you will lose the automaticly generated overview page with all reports.
  • If some modules do not contain all reports, you have to provide individual site.xml files for them to override the parent site.xml.

See Configuring the Site Descriptor in the documentation of the site plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜