davidB / scala-maven-plugin

The scala-maven-plugin (previously maven-scala-plugin) is used for compiling/testing/running/documenting scala code in maven.
https://davidb.github.io/scala-maven-plugin/
The Unlicense
557 stars 151 forks source link

Set -release instead of -target since Scala 2.13.9, close #646 #648

Closed slandelle closed 1 year ago

slandelle commented 1 year ago

Motivation:

Scala 2.13.9 has deprecated -release in favor of -target, see https://www.scala-lang.org/news/2.13.9

As our default value for release is plugged onto maven.compiler.target, we end up with the default behavior of setting -release:8 which now triggers a warning.

Modification:

Don't set -release is it's deprecated. If target is not explicitly defined, use the release value to set the target instead.

Result:

No more deprecation warning