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
Fields Modifier and Type Field Description 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 programprotected 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 :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 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
-
-
Constructor Summary
Constructors Constructor Description ScalaRunMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doExecute()
-
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
-
-
-
-
Field Detail
-
launcher
@Parameter(property="launcher") protected String launcher
The class to use when launching a scala program
-
addArgs
@Parameter(property="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
@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 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.
-
-
Method Detail
-
doExecute
protected void doExecute() throws Exception
- Specified by:
doExecute
in classScalaMojoSupport
- Throws:
Exception
-
-