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
554 stars 150 forks source link

scala-maven-plugin version for scala-library 2.12.15? #737

Closed raisinbl closed 8 months ago

raisinbl commented 8 months ago

I need to run Spark on my project which having both scala and java code. I just found that the scala-maven-plugin is suitable for doing that thing, in my project, the Spark version 3.x is only using scala 2.12 version or 2.13, whereas the major scala version is 2.12.15. I found that none of scala-maven-plugin version is compatible, when I mvn compile it's always raise build/compile failed exception. Here's my full log and pom.xml I notice only to scala 2.12.18 and scala-maven-plugin 4.8.1 can compile, but as I expect, spark can't use because maybe compatible problem between scala and java version :)

p/s: any tips when choosing scala and scala-maven-plugin to make them worked? Thank you for taking your time.

slandelle commented 8 months ago

whereas the major scala version is 2.12.15

No, 2.12.15 is not a major version. It's a minor version.

2 is the generation 12 is the major version 15 is the minor version

Hence the _2.12 suffixes in the artifact names.

Please provide a reproducer matching these criteria as a standalone repository on GitHub.

but as I expect, spark can't use because maybe compatible problem between scala and java version :)

That doesn't make sense. As I said, 2.12.15 and 2.12.18 are minor versions and should be binary compatible. And I fail to see how this would be related to the Java version.

raisinbl commented 8 months ago

whereas the major scala version is 2.12.15

No, 2.12.15 is not a major version. It's a minor version.

2 is the generation 12 is the major version 15 is the minor version

Hence the _2.12 suffixes in the artifact names.

sorry for confusion. what I mean major is majority version of scala-library which is a dependency of Spark 3.x, which also needed for the plugin.

but as I expect, spark can't use because maybe compatible problem between scala and java version :)

for this, maybe I need more time to think about it.