Fork me on GitHub

Maven Sitemap generator plugin

This plugin generate sitemap.xml for project site.

Generated sitemap.xml is consistent with the description:

https://www.sitemaps.org/

Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling.

Usage

You can try it by running in your project:

mvn org.simplify4u.plugins:sitemapxml-maven-plugin:gen

To use it during site build you should add to your project pom

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.simplify4u.plugins</groupId>
          <artifactId>sitemapxml-maven-plugin</artifactId>
          <version>2.2.0</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>

    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.simplify4u.plugins</groupId>
        <artifactId>sitemapxml-maven-plugin</artifactId>
        <executions>
            <execution>
                <goals>
                    <goal>gen</goal>
                </goals>
            </execution>
         </executions>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>