This page shows how to integrate this plugin into your Maven build process.

Configuration

To run successfully this plugin requires the Maven Site Plugin to have run and have generated the report files to include. Therefore add something like the following to the build plugins section of your POM:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-site-plugin</artifactId>
  <executions>
    <execution>
      <id>attach-site</id>
      <phase>package</phase>
      <goals>
        <goal>jar</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>de.smartics.maven.plugin</groupId>
  <artifactId>projectmetadata-maven-plugin</artifactId>
  <version>1.0.0</version>
  <executions>
    <execution>
      <id>metadata</id>
      <goals>
        <goal>archive</goal>
      </goals>
    </execution>
  </executions>
</plugin>

The archive goal will collect the specified reports and copy them to an archive. This archive will then be stored on an artifact server.

Since generating the reports takes a lot of build time, please consider to add the configuration to a profile you may activate for release builds.

<profiles>
  <profile>
    <id>release</id>
    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <executions>
            <execution>
              <id>attach-site</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>de.smartics.maven.plugin</groupId>
          <artifactId>projectmetadata-maven-plugin</artifactId>
          <version>1.0.0</version>
          <executions>
            <execution>
              <id>metadata</id>
              <goals>
                <goal>archive</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>

Activate this profile by adding -Prelease to your Maven command.