scala:console

Full name:

net.alchim31.maven:scala-maven-plugin:4.9.2:console

Description:

Run the Scala console with all the classes of the projects (dependencies and built)

Attributes:

  • Requires a Maven project to be executed.
  • Executes by direct invocation only.
  • Requires dependency resolution of artifacts in scope: test.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Is NOT inherited by default in multi-project builds.

Required Parameters

Name Type Since Description
<displayCmd> boolean - Display the command line called ? (property 'maven.scala.displayCmd' replaced by 'displayCmd')
Default: false
User Property: displayCmd
<mainConsole> String - The console to run.
Default: scala.tools.nsc.MainGenericRunner
User Property: mainConsole
<useRuntimeClasspath> boolean - Add the runtime classpath, to the console's classpath ?
Default: true
User Property: maven.scala.console.useRuntimeClasspath
<useTestClasspath> boolean - Add the test classpath (include classes from test directory), to the console's classpath ?
Default: true
User Property: maven.scala.console.useTestClasspath

Optional Parameters

Name Type Since Description
<addJavacArgs> String - Alternative method for specifying javac arguments (when using incremental compiler). Can be used from command line with -DaddJavacArgs=arg1|arg2|arg3|... rather than in pom.xml.
User Property: addJavacArgs
<addScalacArgs> String - Additional parameter to use to call the main class. Use this parameter only from command line ("-DaddScalacArgs=arg1|arg2|arg3|..."), not from pom.xml. To define compiler arguments in pom.xml see the "args" parameter.
User Property: addScalacArgs
<args> String[] - compiler additional arguments
<checkMultipleScalaVersions> boolean - Check if every dependencies use the same version of scala-library or scala.compat.version.
Default: true
User Property: maven.scala.checkConsistency
<compilerPlugins> BasicArtifact[] - Compiler plugin dependencies to use when compiling. ex:
<compilerPlugins>
  <compilerPlugin>
    <groupId>my.scala.plugin</groupId>
    <artifactId>amazingPlugin</artifactId>
    <version>1.0-SNAPSHOT</version>
  </compilerPlugin>
</compilerPlugins>
<dependencies> BasicArtifact[] - Additional dependencies/jar to add to classpath to run "scalaClassName" (scope and optional field not supported) ex :
   <dependencies>
     <dependency>
       <groupId>org.scala-tools</groupId>
       <artifactId>scala-compiler-addon</artifactId>
       <version>1.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
<encoding> String - The -encoding argument for the Java compiler. (when using incremental compiler).
Default: UTF-8
User Property: project.build.sourceEncoding
<failOnMultipleScalaVersions> boolean - Determines if a detection of multiple scala versions in the dependencies will cause the build to fail.
Default: false
<forceUseArgFile> boolean - Force the use of an external ArgFile to run any forked process.
Default: false
<fork> boolean - Forks the execution of scalac into a separate process.
Default: true
<javaRebelPath> File - Path of the javaRebel jar. If this option is set then the console run with javarebel enabled.
User Property: javarebel.jar.path
<javacArgs> String[] - Arguments for javac (when using incremental compiler).
User Property: javacArgs
<javacGenerateDebugSymbols> boolean - Whether to instruct javac to generate debug symbols (when using incremental compiler)
See also: ://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug
Default: true
User Property: javacGenerateDebugSymbols
<jvmArgs> String[] - Jvm Arguments.
<pluginArtifacts> List<Artifact> - List of artifacts to run plugin
Default: ${plugin.artifacts}
<release> String - The --release argument for the Java compiler (when using incremental compiler), supported since Java9.
User Property: maven.compiler.release
<scalaClassName> String - override the className (FQN) of the scala tool
User Property: maven.scala.className
<scalaCompatVersion> String - Scala 's version to use to check binary compatibility (like suffix in artifactId of dependency). If it is defined then it is used to checkMultipleScalaVersions
User Property: scala.compat.version
<scalaHome> String - Path to Scala installation to use instead of the artifact (define as dependencies).
User Property: scala.home
<scalaOrganization> String - Organization/group ID of the Scala used in the project. Default value is 'org.scala-lang'. This is an advanced setting used for clones of the Scala Language. It should be disregarded in standard use cases.
Default: org.scala-lang
User Property: scala.organization
<scalaVersion> String - Scala 's version to use. (property 'maven.scala.version' replaced by 'scala.version')
User Property: scala.version
<source> String - The -source argument for the Java compiler (when using incremental compiler).
User Property: maven.compiler.source
<target> String - The -target argument for the Java compiler (when using incremental compiler).
User Property: maven.compiler.target
<useCanonicalPath> boolean - Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
See also: https://github.com/davidB/scala-maven-plugin/issues/50
Default: true
User Property: maven.scala.useCanonicalPath

Parameter Details

<addJavacArgs>

Alternative method for specifying javac arguments (when using incremental compiler). Can be used from command line with -DaddJavacArgs=arg1|arg2|arg3|... rather than in pom.xml.
  • Type: java.lang.String
  • Required: No
  • User Property: addJavacArgs

<addScalacArgs>

Additional parameter to use to call the main class. Use this parameter only from command line ("-DaddScalacArgs=arg1|arg2|arg3|..."), not from pom.xml. To define compiler arguments in pom.xml see the "args" parameter.
  • Type: java.lang.String
  • Required: No
  • User Property: addScalacArgs

<args>

compiler additional arguments
  • Type: java.lang.String[]
  • Required: No

<checkMultipleScalaVersions>

Check if every dependencies use the same version of scala-library or scala.compat.version.
  • Type: boolean
  • Required: No
  • User Property: maven.scala.checkConsistency
  • Default: true

<compilerPlugins>

Compiler plugin dependencies to use when compiling. ex:
<compilerPlugins>
  <compilerPlugin>
    <groupId>my.scala.plugin</groupId>
    <artifactId>amazingPlugin</artifactId>
    <version>1.0-SNAPSHOT</version>
  </compilerPlugin>
</compilerPlugins>
  • Type: scala_maven.BasicArtifact[]
  • Required: No

<dependencies>

Additional dependencies/jar to add to classpath to run "scalaClassName" (scope and optional field not supported) ex :
   <dependencies>
     <dependency>
       <groupId>org.scala-tools</groupId>
       <artifactId>scala-compiler-addon</artifactId>
       <version>1.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
  • Type: scala_maven.BasicArtifact[]
  • Required: No

<displayCmd>

Display the command line called ? (property 'maven.scala.displayCmd' replaced by 'displayCmd')
  • Type: boolean
  • Required: Yes
  • User Property: displayCmd
  • Default: false

<encoding>

The -encoding argument for the Java compiler. (when using incremental compiler).
  • Type: java.lang.String
  • Required: No
  • User Property: project.build.sourceEncoding
  • Default: UTF-8

<failOnMultipleScalaVersions>

Determines if a detection of multiple scala versions in the dependencies will cause the build to fail.
  • Type: boolean
  • Required: No
  • Default: false

<forceUseArgFile>

Force the use of an external ArgFile to run any forked process.
  • Type: boolean
  • Required: No
  • Default: false

<fork>

Forks the execution of scalac into a separate process.
  • Type: boolean
  • Required: No
  • Default: true

<javaRebelPath>

Path of the javaRebel jar. If this option is set then the console run with javarebel enabled.
  • Type: java.io.File
  • Required: No
  • User Property: javarebel.jar.path

<javacArgs>

Arguments for javac (when using incremental compiler).
  • Type: java.lang.String[]
  • Required: No
  • User Property: javacArgs

<javacGenerateDebugSymbols>

Whether to instruct javac to generate debug symbols (when using incremental compiler)
See also: ://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug
  • Type: boolean
  • Required: No
  • User Property: javacGenerateDebugSymbols
  • Default: true

<jvmArgs>

Jvm Arguments.
  • Type: java.lang.String[]
  • Required: No

<mainConsole>

The console to run.
  • Type: java.lang.String
  • Required: Yes
  • User Property: mainConsole
  • Default: scala.tools.nsc.MainGenericRunner

<pluginArtifacts>

List of artifacts to run plugin
  • Type: java.util.List<org.apache.maven.artifact.Artifact>
  • Required: No
  • Default: ${plugin.artifacts}

<release>

The --release argument for the Java compiler (when using incremental compiler), supported since Java9.
  • Type: java.lang.String
  • Required: No
  • User Property: maven.compiler.release

<scalaClassName>

override the className (FQN) of the scala tool
  • Type: java.lang.String
  • Required: No
  • User Property: maven.scala.className

<scalaCompatVersion>

Scala 's version to use to check binary compatibility (like suffix in artifactId of dependency). If it is defined then it is used to checkMultipleScalaVersions
  • Type: java.lang.String
  • Required: No
  • User Property: scala.compat.version

<scalaHome>

Path to Scala installation to use instead of the artifact (define as dependencies).
  • Type: java.lang.String
  • Required: No
  • User Property: scala.home

<scalaOrganization>

Organization/group ID of the Scala used in the project. Default value is 'org.scala-lang'. This is an advanced setting used for clones of the Scala Language. It should be disregarded in standard use cases.
  • Type: java.lang.String
  • Required: No
  • User Property: scala.organization
  • Default: org.scala-lang

<scalaVersion>

Scala 's version to use. (property 'maven.scala.version' replaced by 'scala.version')
  • Type: java.lang.String
  • Required: No
  • User Property: scala.version

<source>

The -source argument for the Java compiler (when using incremental compiler).
  • Type: java.lang.String
  • Required: No
  • User Property: maven.compiler.source

<target>

The -target argument for the Java compiler (when using incremental compiler).
  • Type: java.lang.String
  • Required: No
  • User Property: maven.compiler.target

<useCanonicalPath>

Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
See also: https://github.com/davidB/scala-maven-plugin/issues/50
  • Type: boolean
  • Required: No
  • User Property: maven.scala.useCanonicalPath
  • Default: true

<useRuntimeClasspath>

Add the runtime classpath, to the console's classpath ?
  • Type: boolean
  • Required: Yes
  • User Property: maven.scala.console.useRuntimeClasspath
  • Default: true

<useTestClasspath>

Add the test classpath (include classes from test directory), to the console's classpath ?
  • Type: boolean
  • Required: Yes
  • User Property: maven.scala.console.useTestClasspath
  • Default: true