Specifying Scalac Compile-Time Option with maven-scala-plugin

前端 未结 1 648
[愿得一人]
[愿得一人] 2021-01-22 13:04

Using the maven-scala-plugin 2.15.2, I\'m trying to specify the max length of a Scala Class File to \"50\" characters. I tried 2 places in my pom.xml:<

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-22 13:11

    Where you are using args inside configuration should be where you put your compiler args. You seem to have also created scalacArgs, but the args are passed to scalac.

    I use this in my plugin to pass options to the compiler:

    -g:vars -Yrangepos -P:scoverage:dataDir:${coverage.data.dir} -Xmax-classfile-name 70 -Xms64m -Xmx1024m org.scoverage scalac-scoverage-plugin_${scala.major} ${scoverage-plugin.version}

    http://scala-tools.org/mvnsites/maven-scala-plugin/example_compile.html#Compiler_Arguments

    0 讨论(0)
提交回复
热议问题