生成标准的Maven插件文档

问题描述

Maven插件遵循标准的文档编制模式,例如

https://maven.apache.org/maven-release/maven-release-plugin/index.html

带有“目标”,“用法”等部分,每个目标都有专门的页面

如何为自己的Maven插件生成此类文档?

解决方法

看我自己的项目之一,我想就是这样:

<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>${maven.plugin.plugin.version}</version>
            <reportSets>
                <reportSet>
                    <reports>
                        <report>report</report>  <!-- generates standard Maven plugin docs -->
                    </reports>
                </reportSet>
            </reportSets>
        </plugin>
    </plugins>

</reporting>

配置选项位于plugin docs中。