Package scala_maven

Class ScalaRunMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="run",
          requiresDependencyResolution=TEST,
          threadSafe=true)
    @Execute(phase=TEST_COMPILE)
    public class ScalaRunMojo
    extends ScalaMojoSupport
    Run a Scala class using the Scala runtime
    • Field Detail

      • launcher

        @Parameter(property="launcher")
        protected java.lang.String launcher
        The class to use when launching a scala program
      • addArgs

        @Parameter(property="addArgs")
        protected java.lang.String addArgs
        Additional parameter to use to call the main class Using this parameter only from command line ("-DaddArgs=arg1|arg2|arg3|..."), not from pom.xml.
      • launchers

        @Parameter
        protected Launcher[] launchers
        A list of launcher definition (to avoid rewriting long command line or share way to call an application) launchers could be define by :
           <launchers>
             <launcher>
               <id>myLauncher</id>
               <mainClass>my.project.Main</mainClass>
               <args>
                 <arg>arg1</arg>
               </args>
               <jvmArgs>
                 <jvmArg>-Xmx64m</jvmArg>
               </jvmArgs>
             </launcher>
             <launcher>
               <id>myLauncher2</id>
               ...
               <><>
             </launcher>
           </launchers>
         
      • mainClass

        @Parameter(property="mainClass")
        protected java.lang.String mainClass
        Main class to call, the call use the jvmArgs and args define in the pom.xml, and the addArgs define in the command line if define. Higher priority to launcher parameter) Using this parameter only from command line (-DmainClass=...), not from pom.xml.
    • Constructor Detail

      • ScalaRunMojo

        public ScalaRunMojo()
    • Method Detail

      • doExecute

        protected void doExecute()
                          throws java.lang.Exception
        Specified by:
        doExecute in class ScalaMojoSupport
        Throws:
        java.lang.Exception