Package scala_maven
Class ScalaContinuousTestMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
scala_maven.ScalaMojoSupport
scala_maven.ScalaSourceMojoSupport
scala_maven.ScalaCompilerSupport
scala_maven.ScalaContinuousCompileMojo
scala_maven.ScalaContinuousTestMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="cctest",
requiresDependencyResolution=TEST)
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) !!!
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
A space-separated list of the goals to execute as part of running the tests.protected org.apache.maven.shared.invoker.Invoker
protected File
The local repository for caching artifacts.protected String
Specify this parameter to run individual tests by file name, overriding theincludes/excludes
parameters.Fields inherited from class scala_maven.ScalaContinuousCompileMojo
analysisCacheFile, mainOutputDir, mainSourceDir, once, testAnalysisCacheFile, testOutputDir, testSourceDir, useFsc, verbose
Fields inherited from class scala_maven.ScalaCompilerSupport
ALL, INCREMENTAL, MODIFIED_ONLY, recompileMode
Fields inherited from class scala_maven.ScalaSourceMojoSupport
excludes, includes, sendJavaToScalac
Fields inherited from class scala_maven.ScalaMojoSupport
addJavacArgs, addScalacArgs, args, checkMultipleScalaVersions, compilerPlugins, dependencies, displayCmd, encoding, factory, failOnMultipleScalaVersions, forceUseArgFile, fork, JAR, javacArgs, javacGenerateDebugSymbols, jvmArgs, localRepo, mavenProjectBuilder, POM, project, reactorProjects, remoteRepos, resolver, SCALA_COMPILER_ARTIFACTID, SCALA_LIBRARY_ARTIFACTID, scalaClassName, session, source, target, toolchainManager, useCanonicalPath
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Allows derived Mojos to do things after a compile has succesfully completed such as run test casesMethods inherited from class scala_maven.ScalaContinuousCompileMojo
doExecute, getAnalysisCacheFile, getClasspathElements, getOutputDir, getScalaCommand, getSourceDirectories
Methods inherited from class scala_maven.ScalaCompilerSupport
clearCompileErrors, compile, defaultAnalysisCacheFile, defaultAnalysisDirectory, defaultTestAnalysisCacheFile, getAnalysisCacheMap, getFilesToCompile, hasCompileErrors, incrementalCompile
Methods inherited from class scala_maven.ScalaSourceMojoSupport
findSourceWithFilters, findSourceWithFilters, initFilters, normalize
Methods inherited from class scala_maven.ScalaMojoSupport
addCompilerPluginOptions, addCompilerToClasspath, addLibraryToClasspath, addToClasspath, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, execute, findScalaVersion, findVersionFromDependencies, findVersionFromPluginArtifacts, getAllDependencies, getArtifactJar, getArtifactJar, getCompilerDependencies, getCompilerJar, getCompilerPluginOptions, getDependencies, getEmptyScalaCommand, getEmptyScalaCommand, getJavacOptions, getLibraryJar, getPluginArtifactJar, getPluginArtifactJar, getScalaCommand, getScalaOptions, getScalaOrganization, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts, resolveDependencyArtifacts, scalaCompilerArtifact
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
invoker
@Component protected org.apache.maven.shared.invoker.Invoker invoker -
localRepositoryPath
@Parameter(property="invoker.localRepositoryPath", defaultValue="${settings.localRepository}") protected File localRepositoryPathThe 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
Specify this parameter to run individual tests by file name, overriding theincludes/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
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 runscala:cctest
, you can configure the setting in the pom.xml:<plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>2.16.0</version> <configuration> <ccTestGoals>scalatest:test</ccTestGoals> </configuration> <!-- normal executions here --> </plugin>
-
-
Constructor Details
-
ScalaContinuousTestMojo
public ScalaContinuousTestMojo()
-
-
Method Details
-
postCompileActions
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 classScalaContinuousCompileMojo
- Throws:
Exception
-
getMavenGoals
-