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 ScalaCompilerSupportCompile Scala test source into test-classes. Corresponds roughly to testCompile in maven-compiler-plugin
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanskipSet this to 'true' to bypass unit tests entirely.protected java.io.FiletestAnalysisCacheFileAnalysis cache file for incremental recompilation.protected java.io.FiletestOutputDirThe directory in which to place test compilation outputprotected java.io.FiletestSourceDirThe directory in which to find test scala source code-
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 ScalaTestCompileMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()protected java.io.FilegetAnalysisCacheFile()Analysis cache file for incremental recompilation.protected java.util.List<java.lang.String>getClasspathElements()protected java.util.List<org.apache.maven.model.Dependency>getDependencies()protected java.io.FilegetOutputDir()protected java.util.List<java.io.File>getSourceDirectories()Retrieves the list of *all* root source directories.-
Methods inherited from class scala_maven.ScalaCompilerSupport
clearCompileErrors, compile, defaultAnalysisCacheFile, defaultAnalysisDirectory, defaultTestAnalysisCacheFile, doExecute, 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, findScalaVersion, findVersionFromDependencies, findVersionFromPluginArtifacts, getAllDependencies, getArtifactJar, getArtifactJar, getCompilerDependencies, getCompilerJar, getCompilerPluginOptions, getEmptyScalaCommand, getEmptyScalaCommand, getJavacOptions, getLibraryJar, getPluginArtifactJar, getPluginArtifactJar, getScalaCommand, getScalaCommand, getScalaOptions, getScalaOrganization, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts, resolveDependencyArtifacts, scalaCompilerArtifact
-
-
-
-
Field Detail
-
skip
@Parameter(property="maven.test.skip") protected boolean skip
Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion.
-
testOutputDir
@Parameter(defaultValue="${project.build.testOutputDirectory}") protected java.io.File testOutputDirThe directory in which to place test compilation output
-
testSourceDir
@Parameter(defaultValue="${project.build.testSourceDirectory}/../scala") protected java.io.File testSourceDirThe directory in which to find test scala source code
-
testAnalysisCacheFile
@Parameter(property="testAnalysisCacheFile", defaultValue="${project.build.directory}/analysis/test-compile") protected java.io.File testAnalysisCacheFileAnalysis cache file for incremental recompilation.
-
-
Method Detail
-
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
protected java.util.List<java.lang.String> getClasspathElements() throws java.lang.Exception- Specified by:
getClasspathElementsin classScalaCompilerSupport- Throws:
java.lang.Exception
-
getDependencies
protected java.util.List<org.apache.maven.model.Dependency> getDependencies()
- Overrides:
getDependenciesin classScalaMojoSupport
-
getOutputDir
protected java.io.File getOutputDir() throws java.lang.Exception- Specified by:
getOutputDirin classScalaCompilerSupport- Throws:
java.lang.Exception
-
getSourceDirectories
protected java.util.List<java.io.File> getSourceDirectories() throws java.lang.ExceptionDescription 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:
java.lang.Exception
-
getAnalysisCacheFile
protected java.io.File getAnalysisCacheFile() throws java.lang.ExceptionDescription copied from class:ScalaCompilerSupportAnalysis cache file for incremental recompilation.- Specified by:
getAnalysisCacheFilein classScalaCompilerSupport- Throws:
java.lang.Exception
-
-