com.googlecode.refit.mojo
Class FitRunnerMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.googlecode.refit.mojo.FitRunnerMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class FitRunnerMojo
extends org.apache.maven.plugin.AbstractMojo

Mojo to run Fit tests via a Fixture

Author:
Mauro Talevi, Harald Wellmann

Field Summary
protected  boolean caseSensitive
          Flag to indicate that path names are case sensitive
protected  List<String> classpathElements
          Classpath.
protected  boolean ignoreFailures
          The option to ignore fixture failures
protected  String outputDirectory
          The output directory where the results of Fit processing is written to
protected  String[] parseTags
          The parse tags used to identify the Fit tables.
protected  boolean skip
          Flag for skipping Fit execution.
protected  String sourceDirectory
          The source directory containing the Fit fixtures
protected  String sourceExcludes
          The filter for source file excludes, relative to the source directory, as CSV patterns.
protected  String sourceIncludes
          The filter for source file includes, relative to the source directory, as CSV patterns.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
FitRunnerMojo()
           
 
Method Summary
protected  Fixture createFixture()
           
protected  void ensureDirectoryExists(String path)
           
 void execute()
           
protected  boolean failed(Fixture fixture)
           
protected  ClasspathClassLoader getTestClassLoader()
           
protected  String[] listFiles(String sourceDirectory, boolean caseSensitive, String sourceIncludes, String sourceExcludes)
           
protected  String read(Reader in)
           
protected  void run(File in, File out)
           
protected  void run(Reader reader, Writer writer)
           
protected  void run(String sourceDirectory, boolean caseSensitive, String sourceIncludes, String sourceExcludes, String outputDirectory)
           
protected  void run(String in, String out)
           
protected  String toPath(String directory, String name)
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classpathElements

protected List<String> classpathElements
Classpath.


sourceDirectory

protected String sourceDirectory
The source directory containing the Fit fixtures


caseSensitive

protected boolean caseSensitive
Flag to indicate that path names are case sensitive


sourceIncludes

protected String sourceIncludes
The filter for source file includes, relative to the source directory, as CSV patterns.


sourceExcludes

protected String sourceExcludes
The filter for source file excludes, relative to the source directory, as CSV patterns.


parseTags

protected String[] parseTags
The parse tags used to identify the Fit tables.


outputDirectory

protected String outputDirectory
The output directory where the results of Fit processing is written to


ignoreFailures

protected boolean ignoreFailures
The option to ignore fixture failures


skip

protected boolean skip
Flag for skipping Fit execution.

Constructor Detail

FitRunnerMojo

public FitRunnerMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

createFixture

protected Fixture createFixture()

getTestClassLoader

protected ClasspathClassLoader getTestClassLoader()

toPath

protected String toPath(String directory,
                        String name)

listFiles

protected String[] listFiles(String sourceDirectory,
                             boolean caseSensitive,
                             String sourceIncludes,
                             String sourceExcludes)

ensureDirectoryExists

protected void ensureDirectoryExists(String path)
                              throws IOException
Throws:
IOException

run

protected void run(String sourceDirectory,
                   boolean caseSensitive,
                   String sourceIncludes,
                   String sourceExcludes,
                   String outputDirectory)
            throws Exception
Throws:
Exception

run

protected void run(String in,
                   String out)
            throws IOException,
                   ParseException
Throws:
IOException
ParseException

run

protected void run(File in,
                   File out)
            throws IOException,
                   ParseException
Throws:
IOException
ParseException

run

protected void run(Reader reader,
                   Writer writer)
            throws IOException,
                   ParseException
Throws:
IOException
ParseException

failed

protected boolean failed(Fixture fixture)

read

protected String read(Reader in)
               throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.