Package scala_maven
Class ScalaRunMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
scala_maven.ScalaMojoSupport
scala_maven.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 Summary
FieldsModifier and TypeFieldDescriptionprotected String
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
The class to use when launching a scala programprotected Launcher[]
A list of launcher definition (to avoid rewriting long command line or share way to call an application) launchers could be define by :protected String
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 scala_maven.ScalaMojoSupport
addJavacArgs, addScalacArgs, args, checkMultipleScalaVersions, compilerPlugins, dependencies, displayCmd, encoding, factory, failOnMultipleScalaVersions, forceUseArgFile, fork, JAR, javacArgs, javacGenerateDebugSymbols, jvmArgs, localRepo, mavenProjectBuilder, POM, project, reactorProjects, remoteRepos, resolver, SCALA_COMPILER_ARTIFACTID, SCALA_LIBRARY_ARTIFACTID, scalaClassName, session, source, target, toolchainManager, useCanonicalPath
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class scala_maven.ScalaMojoSupport
addCompilerPluginOptions, addCompilerToClasspath, addLibraryToClasspath, addToClasspath, addToClasspath, addToClasspath, addToClasspath, checkScalaVersion, execute, findScalaVersion, findVersionFromDependencies, findVersionFromPluginArtifacts, getAllDependencies, getArtifactJar, getArtifactJar, getCompilerDependencies, getCompilerJar, getCompilerPluginOptions, getDependencies, getEmptyScalaCommand, getEmptyScalaCommand, getJavacOptions, getLibraryJar, getPluginArtifactJar, getPluginArtifactJar, getScalaCommand, getScalaCommand, getScalaOptions, getScalaOrganization, isJavaSupportedByCompiler, resolveArtifactDependencies, resolveDependencyArtifacts, resolveDependencyArtifacts, scalaCompilerArtifact
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
launcher
The class to use when launching a scala program -
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
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
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 Details
-
ScalaRunMojo
public ScalaRunMojo()
-
-
Method Details
-
doExecute
- Specified by:
doExecute
in classScalaMojoSupport
- Throws:
Exception
-