Scala 2.12.4 support
See original GitHub issueWhen I try to compile a project with scala 2.12.4 and Java 8:
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.3.1:compile (default) on project black-marlin-processors-core: wrap: java.lang.reflect.InvocationTargetException: ExceptionInInitializerError: Not a version: 9 -> [Help 1]
And when I run the scala-maven-plugin
integ-test build locally with the scala version set to 2.12.4 I see the following:
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Building Test for Java + Scala compilation with too many files and non-forked execution 1.0-SNAPSHOT
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO]
[INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ testLotsofJavaFiles ---
[INFO] [INFO] Deleting /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/target
[INFO] [INFO]
[INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ testLotsofJavaFiles ---
[INFO] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] [INFO] skip non existing resourceDirectory /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/src/main/resources
[INFO] [INFO]
[INFO] [INFO] --- scala-maven-plugin:3.3.2-SNAPSHOT:add-source (scala-compile-first) @ testLotsofJavaFiles ---
[INFO] [INFO] Add Source directory: /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/src/main/scala
[INFO] [INFO] Add Test Source directory: /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/src/test/scala
[INFO] [INFO]
[INFO] [INFO] --- scala-maven-plugin:3.3.2-SNAPSHOT:compile (scala-compile-first) @ testLotsofJavaFiles ---
[INFO] [INFO] /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/src/main/java:-1: info: compiling
[INFO] [INFO] /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/src/main/scala:-1: info: compiling
[INFO] [INFO] Compiling 514 source files to /Users/ama112/git/scala-maven-plugin/target/it/testLotsofJavaFiles/target/classes at 1517260608759
[INFO] [INFO] java.lang.reflect.InvocationTargetException
[INFO] [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] [INFO] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [INFO] at scala_maven_executions.MainHelper.runMain(MainHelper.java:164)
[INFO] [INFO] at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
[INFO] [ERROR] Caused by: java.lang.ExceptionInInitializerError
[INFO] [INFO] at scala.tools.nsc.util.package$.<init>(package.scala:127)
[INFO] [INFO] at scala.tools.nsc.util.package$.<clinit>(package.scala)
[INFO] [INFO] at scala.tools.nsc.Global.throwableAsString(Global.scala:326)
[INFO] [INFO] at scala.tools.nsc.Global.reportThrowable(Global.scala:325)
[INFO] [INFO] at scala.tools.nsc.Driver.process(Driver.scala:58)
[INFO] [INFO] at scala.tools.nsc.Driver.main(Driver.scala:68)
[INFO] [INFO] at scala.tools.nsc.Main.main(Main.scala)
[INFO] [INFO] ... 6 more
[INFO] [INFO] Caused by: java.lang.NumberFormatException: Not a version: 9
[INFO] [INFO] at scala.util.PropertiesTrait.parts$1(Properties.scala:186)
[INFO] [INFO] at scala.util.PropertiesTrait.isJavaAtLeast(Properties.scala:189)
[INFO] [INFO] at scala.util.PropertiesTrait.isJavaAtLeast$(Properties.scala:183)
[INFO] [INFO] at scala.util.Properties$.isJavaAtLeast(Properties.scala:17)
[INFO] [INFO] at scala.reflect.internal.util.ScalaClassLoader$.<init>(ScalaClassLoader.scala:157)
[INFO] [INFO] at scala.reflect.internal.util.ScalaClassLoader$.<clinit>(ScalaClassLoader.scala)
[INFO] [INFO] ... 13 more
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Scala 2.12.4
Need help running the binaries? Download and use Scala with IntelliJ and then build a project, then test it. Using SDKMAN!, you ...
Read more >Overview - Spark 2.4.4 Documentation - Apache Spark
For the Scala API, Spark 2.4.4 uses Scala 2.12. You will need to use a compatible Scala version (2.12.x). Note that support for...
Read more >org.scala-lang » scala-library » 2.12.4 - Maven Repository
Scala Library » 2.12.4 ; Date, Oct 11, 2017 · Files, pom (1 KB) jar (5.0 MB) View All · Repositories, CentralJCenterSonatype ·...
Read more >scala@2.12 - Homebrew Formulae
Bottle (binary package) installation support provided. Current versions: stable, ✓, 2.12.17. Other versions: scala@2.13, 2.13.
Read more >Our fork of the Scala compiler - Typelevel
Support for Scala 2.10.6 will be considered if sponsors step forward to ... The quickest way to get to a Typelevel Scala 2.12.4...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
funny enough, it does compiles with scala
2.12.4
and2.12.5
, only2.12.6
causes this error for mecould you please share your scala-maven-plugin configuration? I’ve tried 2.12.6 and got aforementioned
java.lang.NumberFormatException: Not a version: 9
here’s my config (well, part which is relevant I believe)
it works fine with
2.12.3
I appreciate your time, thanks!