Usage - Maven Plugin ******************** Links ===== - http://mojo.codehaus.org/fit-maven-plugin/ - https://svn.codehaus.org/mojo/tags/fit-maven-plugin-2.0-beta-1/ Note ==== **Note**: The plugin does not work with the FitLibrary so you are limited to using fixtures defined in the standard fit library. http://jira.codehaus.org/browse/MFIT-6. Install ======= See :doc:`install` for the ``pom.xml`` dependency. Setup Tests =========== Tests need to be created within the Maven project folder: :: src/main/fit/ Sample ColumnFixture ==================== To get a very simple test working: Class ----- Create this class: :: import fit.ColumnFixture; public class Division extends ColumnFixture { public float numerator; public float denominator; public float quotient() { return numerator / denominator; } } html ---- Copy this html file (generated by Microsoft Word): :: ../../misc/howto/fit/egFixture.html ...to: :: src/main/fit/ Configuration ============= Add the following configuration to your ``pom.xml`` file: :: org.codehaus.mojo fit-maven-plugin fixture integration-test src/main/fit true **/*Fixture.html **/Wiki* table tr td target/fit run wiki-fixture integration-test src/main/fit true **/WikiFixture.html wiki table tr td target/fit run Run --- :: mvn integration-test Issues ------ The following error is caused by running using Java 1.4: :: [INFO] [fit:run {execution: fixture}] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] java.util.Arrays.toString([Ljava/lang/Object;)Ljava/lang/String; [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoSuchMethodError: java.util.Arrays.toString([Ljava/lang/Object;)Ljava/lang/String; at org.codehaus.mojo.fit.FitRunnerMojo.execute(FitRunnerMojo.java:106) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) Use Java 1.5 (or above) and you will be fine.