org_scala_tools_maven
Class ScalaContinuousTestMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org_scala_tools_maven.ScalaMojoSupport
          extended by org_scala_tools_maven.ScalaSourceMojoSupport
              extended by org_scala_tools_maven.ScalaCompilerSupport
                  extended by org_scala_tools_maven.ScalaContinuousCompileMojo
                      extended by org_scala_tools_maven.ScalaContinuousTestMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ScalaContinuousTestMojo
extends ScalaContinuousCompileMojo

Compile the main and test scala source directory then run unit test cases in continuous (infinite loop). This is an util goal for commandline usage only (Do not use or call it in a pom) !!!

Version:
$Revision: 1.1 $

Field Summary
protected  String ccTestGoals
          A space-separated list of the goals to execute as part of running the tests.
protected  org.apache.maven.shared.invoker.Invoker invoker
           
protected  File localRepositoryPath
          The local repository for caching artifacts.
protected  String test
          Specify this parameter to run individual tests by file name, overriding the includes/excludes parameters.
 
Fields inherited from class org_scala_tools_maven.ScalaContinuousCompileMojo
mainOutputDir, mainSourceDir, once, testOutputDir, testSourceDir, useFsc, verbose
 
Fields inherited from class org_scala_tools_maven.ScalaCompilerSupport
ALL, loopSleep, MODIFIED_ONLY
 
Fields inherited from class org_scala_tools_maven.ScalaSourceMojoSupport
excludes, includes, sendJavaToScalac
 
Fields inherited from class org_scala_tools_maven.ScalaMojoSupport
args, checkMultipleScalaVersions, compilerPlugins, dependencies, displayCmd, factory, failOnMultipleScalaVersions, forceUseArgFile, fork, jvmArgs, localRepo, mavenProjectBuilder, project, remoteRepos, resolver, SCALA_GROUPID, SCALA_LIBRARY_ARTIFACTID, scalaClassName
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ScalaContinuousTestMojo()
           
 
Method Summary
protected  List<String> getMavenGoals()
           
protected  void postCompileActions()
          Allows derived Mojos to do things after a compile has succesfully completed such as run test cases
 
Methods inherited from class org_scala_tools_maven.ScalaContinuousCompileMojo
doExecute, getClasspathElements, getOutputDir, getScalaCommand, getSourceDirectories
 
Methods inherited from class org_scala_tools_maven.ScalaCompilerSupport
clearCompileErrors, compile, compile, getFilesToCompile, hasCompileErrors
 
Methods inherited from class org_scala_tools_maven.ScalaSourceMojoSupport
findSourceWithFilters, findSourceWithFilters, initFilters, normalize, normalize
 
Methods inherited from class org_scala_tools_maven.ScalaMojoSupport
addCompilerPluginOptions, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, execute, findScalaVersion, getDependencies, getEmptyScalaCommand, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts
 
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

invoker

protected org.apache.maven.shared.invoker.Invoker invoker

localRepositoryPath

protected File localRepositoryPath
The local repository for caching artifacts. It is strongly recommended to specify a path to an isolated repository like ${project.build.directory}/it-repo. Otherwise, your ordinary local repository will be used, potentially soiling it with broken artifacts.


test

protected String test
Specify this parameter to run individual tests by file name, overriding the includes/excludes parameters. Each pattern you specify here will be used to create an include pattern formatted like **/${test}.java, so you can just type "-Dtest=MyTest" to run a single test called "foo/MyTest.java". This parameter will override the TestNG suiteXmlFiles parameter.


ccTestGoals

protected String ccTestGoals
A space-separated list of the goals to execute as part of running the tests. You can use this setting to run different testing tools other than just JUnit. For example, to run the ScalaTest (with the maven-scalatest-plugin):
   mvn -Dcctest.goals=scalatest:test scala:cctest
 
To run both ScalaTest and JUnit tests:
   mvn -Dcctest.goals="surefire:test scalatest:test" scala:cctest
 
If you need to specify the goal every time you run scala:cctest, you can configure the setting in the pom.xml:
    <plugin>
       <groupId>org.scala-tools</groupId>
       <artifactId>maven-scala-plugin</artifactId>
       <version>2.15.1-SNAPSHOT</version>
       <configuration>
          <ccTestGoals>scalatest:test</ccTestGoals>
       </configuration>
       <!-- normal executions here -->
    </plugin>
 

Constructor Detail

ScalaContinuousTestMojo

public ScalaContinuousTestMojo()
Method Detail

postCompileActions

protected void postCompileActions()
                           throws Exception
Description copied from class: ScalaContinuousCompileMojo
Allows derived Mojos to do things after a compile has succesfully completed such as run test cases

Overrides:
postCompileActions in class ScalaContinuousCompileMojo
Throws:
Exception

getMavenGoals

protected List<String> getMavenGoals()


Copyright © 2010-2011 Scala Tools. All Rights Reserved.