Package scala_maven

Class 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 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 testOutputDir
        The directory in which to place test compilation output
      • testSourceDir

        @Parameter(defaultValue="${project.build.testSourceDirectory}/../scala")
        protected java.io.File testSourceDir
        The directory in which to find test scala source code
      • testAnalysisCacheFile

        @Parameter(property="testAnalysisCacheFile",
                   defaultValue="${project.build.directory}/analysis/test-compile")
        protected java.io.File testAnalysisCacheFile
        Analysis cache file for incremental recompilation.
    • Constructor Detail

      • ScalaTestCompileMojo

        public ScalaTestCompileMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Specified by:
        execute in interface org.apache.maven.plugin.Mojo
        Overrides:
        execute in class ScalaMojoSupport
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • getClasspathElements

        protected java.util.List<java.lang.String> getClasspathElements()
                                                                 throws java.lang.Exception
        Specified by:
        getClasspathElements in class ScalaCompilerSupport
        Throws:
        java.lang.Exception
      • getOutputDir

        protected java.io.File getOutputDir()
                                     throws java.lang.Exception
        Specified by:
        getOutputDir in class ScalaCompilerSupport
        Throws:
        java.lang.Exception
      • getSourceDirectories

        protected java.util.List<java.io.File> getSourceDirectories()
                                                             throws java.lang.Exception
        Description copied from class: ScalaSourceMojoSupport
        Retrieves the list of *all* root source directories. We need to pass all .java and .scala files into the scala compiler
        Specified by:
        getSourceDirectories in class ScalaSourceMojoSupport
        Throws:
        java.lang.Exception