Package scala_maven

Class ScalaContinuousCompileMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    ScalaContinuousTestMojo

    @Mojo(name="cc",
          requiresDependencyResolution=TEST)
    public class ScalaContinuousCompileMojo
    extends ScalaCompilerSupport
    Compile the main and test scala source directory in continuous (infinite loop). !! This is an util goal for commandline usage only (Do not use or call it in a pom) !!!
    • Field Detail

      • mainOutputDir

        @Parameter(property="project.build.outputDirectory")
        protected java.io.File mainOutputDir
        The output directory for compilation.
      • mainSourceDir

        @Parameter(defaultValue="${project.build.sourceDirectory}/../scala")
        protected java.io.File mainSourceDir
        The main directory containing scala source for compilation
      • testOutputDir

        @Parameter(defaultValue="${project.build.testOutputDirectory}")
        protected java.io.File testOutputDir
        The directory to place test compilation output in
      • testSourceDir

        @Parameter(defaultValue="${project.build.testSourceDirectory}/../scala")
        protected java.io.File testSourceDir
        The directory containing test source for compilation
      • analysisCacheFile

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

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

        @Parameter(property="fsc",
                   defaultValue="true")
        protected boolean useFsc
        Define if fsc should be used, else scalac is used. fsc => scala.tools.nsc.CompileClient, scalac => scala.tools.nsc.Main.
      • once

        @Parameter(property="once",
                   defaultValue="false")
        protected boolean once
        Define if cc should run once or in infinite loop. (useful for test or working with editor)
      • verbose

        @Parameter(property="verbose",
                   defaultValue="false")
        protected boolean verbose
        Turns verbose output on.
    • Constructor Detail

      • ScalaContinuousCompileMojo

        public ScalaContinuousCompileMojo()
    • Method Detail

      • 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
      • doExecute

        protected final void doExecute()
                                throws java.lang.Exception
        Overrides:
        doExecute in class ScalaCompilerSupport
        Throws:
        java.lang.Exception
      • postCompileActions

        protected void postCompileActions()
                                   throws java.lang.Exception
        Allows derived Mojos to do things after a compile has succesfully completed such as run test cases
        Throws:
        java.lang.Exception
      • startNewCompileServer

        private void startNewCompileServer()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception