org_scala_tools_maven
Class ScalaRunMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org_scala_tools_maven.ScalaMojoSupport
          extended by org_scala_tools_maven.ScalaRunMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ScalaRunMojo
extends ScalaMojoSupport

Run a Scala class using the Scala runtime


Field Summary
protected  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.
protected  String launcher
          The class to use when launching a scala program
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> ...
protected  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.
 
Fields inherited from class org_scala_tools_maven.ScalaMojoSupport
args, checkMultipleScalaVersions, compilerPlugins, dependencies, displayCmd, factory, failOnMultipleScalaVersions, forceUseArgFile, fork, jvmArgs, localRepo, mavenProjectBuilder, project, remoteRepos, resolver, SCALA_GROUPID, SCALA_LIBRARY_ARTIFACTID, scalaClassName
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ScalaRunMojo()
           
 
Method Summary
protected  void doExecute()
           
 
Methods inherited from class org_scala_tools_maven.ScalaMojoSupport
addCompilerPluginOptions, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, execute, findScalaVersion, getDependencies, getEmptyScalaCommand, getScalaCommand, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

launcher

protected String launcher
The class to use when launching a scala program


addArgs

protected 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

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

protected 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 Exception
Specified by:
doExecute in class ScalaMojoSupport
Throws:
Exception


Copyright © 2010-2011 Scala Tools. All Rights Reserved.