Usage

Brief examples on how to use the fitnesse-cpgen goals.

Generic Plugin configuration information

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

Include markers into your Fitnesse Suite

Just include the markers into your Fitnesse Suites as described below:

!*****> '''Classpath'''
# begin of maven classpath
# end of maven classpath
*****!
Fitnesse Suite 1Fitnesse Suite 2

The Valtech Maven Repository

You need to add the Valtech Maven Repository to your pom.xml (or settings.xml of course).

<project>
  [...]
  <pluginRepositories>
    <pluginRepository>
      <id>vt-oss-releases</id>
      <name>Valtech Open Source Releases</name>
      <url>http://source.valtech.com/repo/content/repositories/releases/</url>
    </pluginRepository>
  </pluginRepositories>
  [...]
</project>

The fitnesse-cpgen:gencp mojo

This goal is meant to be bound to a lifecycle phase and configured in your pom.xml . It collects the dependencies of the entire project, including its sub-modules. After resolving the artifacts, it generates the classpath and inserts it into the test-suites, which contain the markers as described above.

Therefore the parameter 'fitnesseRoot' is required.

Configure the plugin something like this if you intend to bind it to execute along with your build:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>com.valtech.source.maven</groupId>
        <artifactId>maven-fitnesse-cpgen-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <fitnesseRoot>${basedir}/src/wikipages/FitNesseRoot</fitnesseRoot>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>gencp</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

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

mvn fitnesse-cpgen:gencp

you must not put the configuration inside the executions tag. Your configuration should look like this:

<project>
  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>com.valtech.source.maven</groupId>
        <artifactId>maven-fitnesse-cpgen-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <fitnesseRoot>${basedir}/src/wikipages/FitNesseRoot</fitnesseRoot>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>