Scala version warning for scala-java8-compat_2.12:0.8.0

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Scala version warning for scala-java8-compat_2.12:0.8.0



I am using scala 2.12.1 for a project built with maven but am getting version warnings like the one below:


[WARNING] org.scala-lang.modules:scala-java8-compat_2.12:0.8.0 requires scala version: 2.12.0
[WARNING] Multiple versions of scala libraries detected!



What can I do to get the versioning right here? From what I understand these are libraries scala itself brings in and not explicitly defined by me. I get the same for xml lib too.


xml




1 Answer
1



To get rid of such warnings just add this to the <configuration> block of the <maven-scala-plugin> definition in your pom.xml:


<configuration>


<maven-scala-plugin>


<scalaCompatVersion>${scala.compat.version}</scalaCompatVersion>



And add <scala.compat.version>2.12</scala.compat.version> to the <properties> section.


<scala.compat.version>2.12</scala.compat.version>


<properties>



These warnings may be safely discarded unless major or minor versions differ. As stated here:



We guarantee forwards and backwards compatibility of the "org.scala-lang" % "scala-library" % "2.N.x" and "org.scala-lang" % "scala-reflect" % "2.N.x" artifacts



Also, to find out how some library appeared in one's project dependencies, one can use:


$ mvn dependency:tree






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

'Series' object is not callable Error / Statsmodels illegal variable name