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
Fields Modifier and Type Field Description protected java.lang.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 java.io.File
localRepositoryPath
The local repository for caching artifacts.protected java.lang.String
test
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
-
-
Constructor Summary
Constructors Constructor Description ScalaContinuousTestMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.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 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
-
-
-
-
Field Detail
-
invoker
@Component protected org.apache.maven.shared.invoker.Invoker invoker
-
localRepositoryPath
@Parameter(property="invoker.localRepositoryPath", defaultValue="${settings.localRepository}") protected java.io.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
@Parameter(property="test") protected java.lang.String 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
@Parameter(property="cctest.goals", defaultValue="surefire:test") protected java.lang.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 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>
-
-
Method Detail
-
postCompileActions
protected void postCompileActions() throws java.lang.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 classScalaContinuousCompileMojo
- Throws:
java.lang.Exception
-
getMavenGoals
protected java.util.List<java.lang.String> getMavenGoals()
-
-