mavenmaven-pluginmaven-site-plugin

Generate standard maven plugin documentation


Maven plugins follow a standard pattern for documentation, like e.g.

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

with a "goals", "usage" etc. section and each goal with a dedicated page.

How can I generate such documentation for my own Maven plugin?


Solution

  • Looking at one of my own projects, I think it's just this:

    <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>
    

    Configuration options are in the plugin docs.