When working with Maven 2 and FitNesse, it is desirable to use the Maven classpath in FitNesse. The FitNesse Maven plugin can do this for running tests in a build, but not for using FitNesse interactively.

While googling for a solution, the first hit that I got which addresses this problem is a blog by my fellow Xebian Erik Pragt. A drawback of his approach is that it does not handle transitive dependencies. Therefore, I found the need to write my own script. It uses a technology that is a little less groovy than what Erik used. But that did not stop me for wanting to share it with you, so here it is:

Before using it, please note the following:

  • The script generates a page with classpath entries on a location specified by CLASSPATH_PAGE. You have to change the CLASSPATH_PAGE to your own page.
  • The generated classpath assumes that Java system property MAVEN_REPO is set. This can be done by updating the FitNesse run.sh script to include .

I tried to translate it to a Windows script but ran into the problem that the Maven classpath was bigger than the Windows limitation of 8192 characters. If you find a solution for this (other than using Cygwin), please share it!