com.github.searls.jasmine
Class AbstractJasmineMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.github.searls.jasmine.AbstractJasmineMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GenerateManualRunnerMojo, PreparePackageMojo, ProcessResourcesMojo, ProcessTestResourcesMojo, TestMojo

public abstract class AbstractJasmineMojo
extends org.apache.maven.plugin.AbstractMojo


Field Summary
protected  String browserVersion
          Determines the browser and version profile to execute the headless specs against.
protected  File customRunnerTemplate
          It may be the case that the jasmine-maven-plugin doesn't currently suit all of your needs, and as a result the generated SpecRunner HTML files are set up in a way that you can't run your specs.
protected  boolean debug
          True to increase HtmlUnit output and attempt reporting on specs even if a timeout occurred.
protected  String format
          Determines the format that jasmine:test will print to console.
protected  boolean haltOnFailure
           
protected  File jasmineTargetDir
           
protected  File jsSrcDir
           
protected  File jsTestSrcDir
           
protected  String junitXmlReportFileName
           
protected  String manualSpecRunnerHtmlFileName
           
protected  org.apache.maven.project.MavenProject mavenProject
           
protected  File packageDir
           
protected  String packageJavaScriptPath
           
protected  List<String> preloadSources
          JavaScript sources (typically vendor/lib dependencies) that need to be loaded before other sources (and specs) in a particular order.
protected  boolean skipTests
           
protected  String sourceEncoding
           
protected  String specDirectoryName
           
protected  String specRunnerHtmlFileName
           
protected  String srcDirectoryName
           
protected  int timeout
          Timeout for spec execution in seconds.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJasmineMojo()
           
 
Method Summary
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

jsSrcDir

protected File jsSrcDir

jsTestSrcDir

protected File jsTestSrcDir

browserVersion

protected String browserVersion
Determines the browser and version profile to execute the headless specs against. Because the plugin executes specs using HtmlUnit, this maps 1-to-1 with the public static instances found in BrowserVersion. Some valid examples: FIREFOX_3_6, INTERNET_EXPLORER_6, INTERNET_EXPLORER_7, INTERNET_EXPLORER_8


format

protected String format
Determines the format that jasmine:test will print to console. Valid options: "documentation" - (default) - print specs in a nested format "progress" - more terse, with a period for a passed specs and an 'F' for failures (e.g. '...F...')


packageJavaScriptPath

protected String packageJavaScriptPath

preloadSources

protected List<String> preloadSources
JavaScript sources (typically vendor/lib dependencies) that need to be loaded before other sources (and specs) in a particular order. Each source will first be searched for relative to ${jsSrcDir}, then ${jsTestSrcDir}, then (if it's not found in either) it will be included exactly as it appears in your POM. Therefore, if jquery.js is in `${jsSrcDir}/vendor`, you would configure: <preloadSources> <source>vendor/z.js</source> </preloadSources> And z.js would load before all the other sources and specs.


customRunnerTemplate

protected File customRunnerTemplate
It may be the case that the jasmine-maven-plugin doesn't currently suit all of your needs, and as a result the generated SpecRunner HTML files are set up in a way that you can't run your specs. Have no fear! Simply specify a custom spec runner template in the plugin configuration and make the changes you need. The default template is stored in `src/main/resources/jasmine-templates/SpecRunner.htmltemplate`, and the required template strings are tokenized in "$*$" patterns. Example usage: <customRunnerTemplate>${project.basedir}/src/test/resources/myCustomRunner.template</customRunnerTemplate>


jasmineTargetDir

protected File jasmineTargetDir

skipTests

protected boolean skipTests

haltOnFailure

protected boolean haltOnFailure

timeout

protected int timeout
Timeout for spec execution in seconds.


debug

protected boolean debug
True to increase HtmlUnit output and attempt reporting on specs even if a timeout occurred.


packageDir

protected File packageDir

specRunnerHtmlFileName

protected String specRunnerHtmlFileName

manualSpecRunnerHtmlFileName

protected String manualSpecRunnerHtmlFileName

junitXmlReportFileName

protected String junitXmlReportFileName

specDirectoryName

protected String specDirectoryName

srcDirectoryName

protected String srcDirectoryName

sourceEncoding

protected String sourceEncoding

mavenProject

protected org.apache.maven.project.MavenProject mavenProject
Constructor Detail

AbstractJasmineMojo

public AbstractJasmineMojo()


Copyright © 2011. All Rights Reserved.