------ Usage ------ Ruud de Jong ------ Sep 2009 ------

Usage

Brief examples on how to use the goals.

Generic Plugin configuration information

See the following links for information about including and configuring plugins in your project:

The jrt:trace mojo

This goal is meant to be bound to the lifecycle phase 'test-compile' and configured in your pom.xml. It will look for configuration settings. If none can be found, the default will be used.

For each parameters file specified a report will be generated. If a parameters file does not exists it is skipped.

The buildnumber is optional.

Configure the plugin something like this:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>net.sourceforge.reqtracer.mojo</groupId>
        <artifactId>jrt-maven-plugin</artifactId>
        <version>1.7.0</version>
        <executions>
          <execution>
            <goals>
              <goal>trace</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <buildNumber>${build.number}</buildNumber> <!-- Eg. from org.codehaus.mojo.buildnumber-maven-plugin -->
          <traceParamsFilenames>
                [ src/main/config/traceability_params.properties,
             src/test/config/traceability_params.properties ]
          </traceParamsFilenames>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

If you intend to configure this mojo for execution on the command line use:

mvn jrt:trace

If you intend to use this mojo in a multi-module setup you can set the same configuration in your superPOM, or you can split the definition from the usage like this:

SuperPOM (definition):

<project>
  [...]
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>net.sourceforge.reqtracer.mojo</groupId>
          <artifactId>jrt-maven-plugin</artifactId>
          <version>1.7.0</version>
          <configuration>
            <buildNumber>${build.number}</buildNumber> <!-- Eg. from org.codehaus.mojo.buildnumber-maven-plugin -->
          </configuration>
        </plugin>
        [...]
      </plugins>
    [...]
    </pluginManagement>
  [...]
  </build>
  [...]
</project>

SubPOM (usage):

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>net.sourceforge.reqtracer.mojo</groupId>
        <artifactId>jrt-maven-plugin</artifactId>
        <version>1.7.0</version>
        <executions>
          <execution>
            <goals>
              <goal>trace</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      [...]
    </plugins>
    [...]
  </build>
  [...]
</project>

The jrt:aggregate mojo

This goal is for multi-module projects only. It can aggregate multiple traceability reports into an overview report. NB. Main and system test code reports should be aggregated separately.

In order for the traceability reports to exists upon aggregation one must run this this goal in the last (in the dependency chain) subproject pom.

It is bound to the lifecycle phase 'test' and configured in your pom.xml. It will look for configuration settings. If none can be found, the default will be used.

For each parameters file specified a report will be generated. If a parameters file does not exists it is skipped.

Configure the plugin something like this:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>net.sourceforge.reqtracer.mojo</groupId>
        <artifactId>jrt-maven-plugin</artifactId>
        <version>1.7.0</version>
        <executions>
          <execution>
            <goals>
              <goal>aggregate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <aggregateParamsFilenames>
                [ src/test/config/traceability_overview_params_main.properties,
                  src/test/config/traceability_overview_params_system_test.properties ]
          </aggregateParamsFilenames>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

If you intend to configure this mojo for execution on the command line use:

mvn jrt:aggregate