Closed roman-mibex-2 closed 1 year ago
@roman-mibex-2 Please provide a sample project to reproduce your issue.
Here is an example project: https://github.com/roman-mibex-2/reproduce-java-8-scala-3-example
@roman-mibex-2 Thanks. PR under built. I've verified locally that it fixes your issue. I'm waiting for the CI to pass before merging and releasing.
Release 4.8.1 should be up on maven central in ~20 minutes.
It does work for us. Thanks for the incredible fast fix.
It looks like mixed compilation with Java 8 and Scala 3.x (Scala 3.2.2 in my case) is broken.
The compilation fails with:
The issue seems to be introduced by this change: https://github.com/davidB/scala-maven-plugin/commit/ede3d72e206b8d9a7ad07d28fc27863ccc7264d6
The rough issue:
-release 1.8
is added to the Scalac command, which it doesn't like. TheScalaMojoSupport.targetOption
does translate the Maven1.8
Java version to8
, but only for the Scala 2.x compiler series.So, it seems that either the
-release
flag isn't correct for Scala 3.x, or the version translation should be applied to Scacal 3.x as well.