Search code examples
javamavenpluginsclasspathfitnesse

FitNesse Maven Classpath plugin (ClassNotFoundException)


I followed the instructions the README of https://github.com/amolenaar/fitnesse-maven-classpath.

I have a fitnesse-standalone.jar and in the same directory, i have the below plugin.properties file:

Theme=bootstrap
SymbolTypes=fitnesse.wikitext.widgets.MavenClasspathSymbolType

The directory structure is as follows:

05/27/2014  06:19 PM         6,309,648 fitnesse-standalone.jar
05/27/2014  06:20 PM    <DIR>          FitNesseRoot
05/27/2014  06:24 PM                15 plugins.properties   

I executed the below:

java -jar fitnesse-standalone.jar

And I got the below error:

Exception in thread "main" fitnesse.PluginException: Unable to load class fitnesse.wikitext.widgets.MavenClasspathSymbolType
    at fitnesse.PluginsLoader.forName(PluginsLoader.java:191)
    at fitnesse.PluginsLoader.loadSymbolTypes(PluginsLoader.java:123)
    at fitnesse.ContextConfigurator.makeFitNesseContext(ContextConfigurator.java:135)
    at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:55)
    at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:48)
    at fitnesseMain.FitNesseMain.main(FitNesseMain.java:32)
Caused by: java.lang.ClassNotFoundException: fitnesse.wikitext.widgets.MavenClasspathSymbolType
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at fitnesse.PluginsLoader.forName(PluginsLoader.java:189)
    ... 5 more

Does anyone know how to make this work? How do I "install" the fitnesse plugin?

Thanks


Solution

    1. Create a plugins folder in the same dir as fitnesse-standalone.jar.
    2. Build and compile the plugin via mvn
    3. Copy the jar(s) in your plugin folder
    4. Add the string "SymbolTypes=fitnesse.wikitext.widgets.MavenClasspathSymbolType" in your plugins.properties file
    5. Run fitnesse-standalone.jar