Package scala_maven

Class 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 Detail

      • invoker

        @Component
        protected org.apache.maven.shared.invoker.Invoker invoker
      • localRepositoryPath

        @Parameter(property="invoker.localRepositoryPath",
                   defaultValue="${settings.localRepository}")
        protected 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 String test
        Specify this parameter to run individual tests by file name, overriding the includes/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 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 run scala: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>
         
    • Constructor Detail

      • ScalaContinuousTestMojo

        public ScalaContinuousTestMojo()