Changing the Template File

It is possible to change the Velocity template used for creating the site. Save your custom template in a directory of your choice and configure the Site Plugin accordingly.

Note: If you use this method then skins and the default templates, CSS and images are disabled. It is therefor highly recommended that you package this as a skin instead.

For version 2.0-beta-5 and later you would add something like this to your pom.xml:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.8.2</version>
        <configuration>
          <templateFile>${basedir}/maven-site.vm</templateFile>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>

For version 2.0-beta-4 and earlier it was done by adding this to your pom.xml:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>2.0-beta-4</version>
        <configuration>
          <templateDirectory>${basedir}</templateDirectory>
          <template>maven-site.vm</template>
        </configuration>
      </plugin>
    </plugins>
  </build>
  ...
</project>

Then you execute the site goal from your project:

mvn site

If you do not want to start from scratch you can start with the default template that is used by the Site Plugin.

For more information about Velocity, see http://velocity.apache.org/.