Package scala_maven
Class ScalaTestCompileMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
scala_maven.ScalaMojoSupport
scala_maven.ScalaSourceMojoSupport
scala_maven.ScalaCompilerSupport
scala_maven.ScalaTestCompileMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="testCompile",
defaultPhase=TEST_COMPILE,
requiresDependencyResolution=TEST,
threadSafe=true)
public class ScalaTestCompileMojo
extends ScalaCompilerSupport
Compile Scala test source into test-classes. Corresponds roughly to
testCompile
in maven-compiler-plugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanSet this to 'true' to bypass unit tests entirely.protected FileAnalysis cache file for incremental recompilation.protected FileThe directory in which to place test compilation outputprotected FileThe directory in which to find test scala source codeFields inherited from class scala_maven.ScalaCompilerSupport
ALL, INCREMENTAL, MODIFIED_ONLY, recompileModeFields inherited from class scala_maven.ScalaSourceMojoSupport
excludes, includes, sendJavaToScalacFields 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, useCanonicalPathFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class scala_maven.ScalaCompilerSupport
clearCompileErrors, compile, defaultAnalysisCacheFile, defaultAnalysisDirectory, defaultTestAnalysisCacheFile, doExecute, getAnalysisCacheMap, getFilesToCompile, hasCompileErrors, incrementalCompileMethods inherited from class scala_maven.ScalaSourceMojoSupport
findSourceWithFilters, findSourceWithFilters, initFilters, normalizeMethods inherited from class scala_maven.ScalaMojoSupport
addCompilerPluginOptions, addCompilerToClasspath, addLibraryToClasspath, addToClasspath, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, findScalaVersion, findVersionFromDependencies, findVersionFromPluginArtifacts, getAllDependencies, getArtifactJar, getArtifactJar, getCompilerDependencies, getCompilerJar, getCompilerPluginOptions, getEmptyScalaCommand, getEmptyScalaCommand, getJavacOptions, getLibraryJar, getPluginArtifactJar, getPluginArtifactJar, getScalaCommand, getScalaCommand, getScalaOptions, getScalaOrganization, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts, resolveDependencyArtifacts, scalaCompilerArtifactMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
skip
@Parameter(property="maven.test.skip") protected boolean skipSet this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion. -
testOutputDir
The directory in which to place test compilation output -
testSourceDir
@Parameter(defaultValue="${project.build.testSourceDirectory}/../scala") protected File testSourceDirThe directory in which to find test scala source code -
testAnalysisCacheFile
@Parameter(property="testAnalysisCacheFile", defaultValue="${project.build.directory}/analysis/test-compile") protected File testAnalysisCacheFileAnalysis cache file for incremental recompilation.
-
-
Constructor Details
-
ScalaTestCompileMojo
public ScalaTestCompileMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classScalaMojoSupport- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getClasspathElements
- Specified by:
getClasspathElementsin classScalaCompilerSupport- Throws:
Exception
-
getDependencies
- Overrides:
getDependenciesin classScalaMojoSupport
-
getOutputDir
- Specified by:
getOutputDirin classScalaCompilerSupport- Throws:
Exception
-
getSourceDirectories
Description copied from class:ScalaSourceMojoSupportRetrieves the list of *all* root source directories. We need to pass all .java and .scala files into the scala compiler- Specified by:
getSourceDirectoriesin classScalaSourceMojoSupport- Throws:
Exception
-
getAnalysisCacheFile
Description copied from class:ScalaCompilerSupportAnalysis cache file for incremental recompilation.- Specified by:
getAnalysisCacheFilein classScalaCompilerSupport- Throws:
Exception
-