Click here to lend your support to: scala-maven-plugin and make a donation at www.pledgie.com !

scala:compile

Full name:

net.alchim31.maven:scala-maven-plugin:3.1.6:compile

Description:

Compiles a directory of Scala source. Corresponds roughly to the compile goal of the maven-compiler-plugin

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: compile.

Required Parameters

Name Type Since Description
displayCmd boolean - Display the command line called ? (property 'maven.scala.displayCmd' replaced by 'displayCmd')
Default value is: false.
scalaClassName String - className (FQN) of the scala tool to provide as
Default value is: scala.tools.nsc.Main.

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.
addScalacArgs String - Additional parameter to use to call the main class Using this parameter only from command line ("-DaddScalacArgs=arg1|arg2|arg3|..."), not from pom.xml.
addZincArgs String - Additional parameter to use to call zinc server It is a pipe '|' separated list of arguments, so it can be used from command line ("-DaddZincArgs=arg1|arg2|arg3|...").
analysisCacheFile File - Analysis cache file for incremental recompilation.
Default value is: ${project.build.directory}/analysis/compile.
args String[] - compiler additionnals arguments
checkMultipleScalaVersions boolean - Check if every dependencies use the same version of scala-library or scala.compat.version.
Default value is: true.
compileOrder String - Compile order for Scala and Java sources for sbt incremental compile. Can be Mixed, JavaThenScala, or ScalaThenJava.
Default value is: mixed.
compilerPlugins BasicArtifact[] - Compiler plugin dependencies to use when compiling. ex:
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).
excludes Set - A list of exclusion filters for the compiler. ex :
   <excludes>
     <exclude>SomeBadFile.scala</exclude>
   </excludes>

failOnMultipleScalaVersions boolean - Determines if a detection of multiple scala versions in the dependencies will cause the build to fail.
Default value is: false.
forceUseArgFile boolean - Force the use of an external ArgFile to run any forked process.
Default value is: false.
fork boolean - Forks the execution of scalac into a separate process.
Default value is: true.
includes Set - A list of inclusion filters for the compiler. ex :
   <includes>
     <include>SomeFile.scala</include>
   </includes>

javacArgs String[] - Arguments for javac (when using incremental compiler).
javacGenerateDebugSymbols boolean - Whether to instruct javac to generate debug symbols (when using incremental compiler)
Default value is: true.
jvmArgs String[] - Jvm Arguments.
notifyCompilation boolean - notifyCompilation if true then print a message "path: compiling" for each root directory or files that will be compiled. Useful for debug, and for integration with Editor/IDE to reset markers only for compiled files.
Default value is: true.
outputDir File - The directory in which to place compilation output
pluginArtifacts List - (no description)
Default value is: ${plugin.artifacts}.
recompileMode String - Recompile mode to use when sources were previously compiled and there is at least one change: "modified-only" => only modified sources are recompiled (pre 2.13 behavior), "all" => all sources are recompiled, "incremental" => incrementally recompile modified sources and other affected sources.
Default value is: all.
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
scalaHome String - Path to Scala installation to use instead of the artifact (define as dependencies).
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 value is: org.scala-lang.
scalaVersion String - Scala 's version to use. (property 'maven.scala.version' replaced by 'scala.version')
sendJavaToScalac boolean - Enables/Disables sending java source to the scala compiler.
Default value is: true.
source String - The -source argument for the Java compiler (when using incremental compiler).
sourceDir File - The directory which contains scala/java source files
target String - The -target argument for the Java compiler (when using incremental compiler).
useCanonicalPath boolean - Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
Default value is: true.
useZincServer boolean - Use zinc server for incremental recompilation.
Default value is: false.
zincPort int - Zinc server port, if running with incremental zinc server mode.
Default value is: 3030.

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
  • Expression: ${addJavacArgs}

addScalacArgs:

Additional parameter to use to call the main class Using this parameter only from command line ("-DaddScalacArgs=arg1|arg2|arg3|..."), not from pom.xml.
  • Type: java.lang.String
  • Required: No
  • Expression: ${addScalacArgs}

addZincArgs:

Additional parameter to use to call zinc server It is a pipe '|' separated list of arguments, so it can be used from command line ("-DaddZincArgs=arg1|arg2|arg3|...").
  • Type: java.lang.String
  • Required: No
  • Expression: ${addZincArgs}

analysisCacheFile:

Analysis cache file for incremental recompilation.
  • Type: java.io.File
  • Required: No
  • Expression: ${analysisCacheFile}
  • Default: ${project.build.directory}/analysis/compile

args:

compiler additionnals 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
  • Expression: ${maven.scala.checkConsistency}
  • Default: true

compileOrder:

Compile order for Scala and Java sources for sbt incremental compile. Can be Mixed, JavaThenScala, or ScalaThenJava.
  • Type: java.lang.String
  • Required: No
  • Expression: ${compileOrder}
  • Default: mixed

compilerPlugins:

Compiler plugin dependencies to use when compiling. ex:
  • 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
  • Expression: ${displayCmd}
  • Default: false

encoding:

The -encoding argument for the Java compiler. (when using incremental compiler).
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.sourceEncoding}

excludes:

A list of exclusion filters for the compiler. ex :
   <excludes>
     <exclude>SomeBadFile.scala</exclude>
   </excludes>
  • Type: java.util.Set
  • Required: No

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

includes:

A list of inclusion filters for the compiler. ex :
   <includes>
     <include>SomeFile.scala</include>
   </includes>
  • Type: java.util.Set
  • Required: No

javacArgs:

Arguments for javac (when using incremental compiler).
  • Type: java.lang.String[]
  • Required: No
  • Expression: ${javacArgs}

javacGenerateDebugSymbols:

Whether to instruct javac to generate debug symbols (when using incremental compiler)
  • Type: boolean
  • Required: No
  • Expression: ${javacGenerateDebugSymbols}
  • Default: true

jvmArgs:

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

notifyCompilation:

notifyCompilation if true then print a message "path: compiling" for each root directory or files that will be compiled. Useful for debug, and for integration with Editor/IDE to reset markers only for compiled files.
  • Type: boolean
  • Required: No
  • Expression: ${notifyCompilation}
  • Default: true

outputDir:

The directory in which to place compilation output
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.outputDirectory}

pluginArtifacts:

(no description)
  • Type: java.util.List
  • Required: No
  • Default: ${plugin.artifacts}

recompileMode:

Recompile mode to use when sources were previously compiled and there is at least one change: "modified-only" => only modified sources are recompiled (pre 2.13 behavior), "all" => all sources are recompiled, "incremental" => incrementally recompile modified sources and other affected sources.
  • Type: java.lang.String
  • Required: No
  • Expression: ${recompileMode}
  • Default: all

scalaClassName:

className (FQN) of the scala tool to provide as
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${maven.scala.className}
  • Default: scala.tools.nsc.Main

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
  • Expression: ${scala.compat.version}

scalaHome:

Path to Scala installation to use instead of the artifact (define as dependencies).
  • Type: java.lang.String
  • Required: No
  • Expression: ${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
  • Expression: ${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
  • Expression: ${scala.version}

sendJavaToScalac:

Enables/Disables sending java source to the scala compiler.
  • Type: boolean
  • Required: No
  • Default: true

source:

The -source argument for the Java compiler (when using incremental compiler).
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.compiler.source}

sourceDir:

The directory which contains scala/java source files
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.sourceDirectory}/../scala

target:

The -target argument for the Java compiler (when using incremental compiler).
  • Type: java.lang.String
  • Required: No
  • Expression: ${maven.compiler.target}

useCanonicalPath:

Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
  • Type: boolean
  • Required: No
  • Expression: ${maven.scala.useCanonicalPath}
  • Default: true

useZincServer:

Use zinc server for incremental recompilation.
  • Type: boolean
  • Required: No
  • Expression: ${useZincServer}
  • Default: false

zincPort:

Zinc server port, if running with incremental zinc server mode.
  • Type: int
  • Required: No
  • Expression: ${zincPort}
  • Default: 3030