Here are the relevant lines from the build.sbt file:
sparkVersion := "2.2.0"
scalaVersion := "2.11.8"
version := "0.10.0"
artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
artifact.name + "_" + sv.full + "-" + sparkVersion.value + "_" + module.revision + "." + artifact.extension
}
The $ sbt package command generates a JAR file named spark-daria_2.11.8-2.2.0_0.10.0.jar.
I don't want the Scala patch version to be displayed in the generated JAR file. How can I update the artifactName code to generate a file named spark-daria_2.11-2.2.0_0.10.0.jar?
I don't want to hardcode it like this:
artifact.name + "_2.11-" + sparkVersion.value + "_" + module.revision + "." + artifact.extension
ScalaVersion#binary has up-to-minor version string.
The (somewhat unintuitive) name refers to Scala versions with a binary compatible guarantee and is commonly seen in scripts that do cross-building
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With