Allow cross-build with different ElasticSearch versions
When using different versions of ElasticSearch, the client
library would need to change to adapt the different API
and capabilities of the ElasticSearch server.
Allow specifying a custom version of ElasticSearch Java
API layer by setting a Java System Property.
Example of building the ETL for ElasticSearch 8.15.0:
sbt -Delasticsearch-spark-20-version=8.15.0 assembly
Change-Id: I1b749a8825e052bc8fea89dafb83feb9e3dcc458
diff --git a/project/SharedSettings.scala b/project/SharedSettings.scala
index 6605dcd..136fef6 100644
--- a/project/SharedSettings.scala
+++ b/project/SharedSettings.scala
@@ -105,7 +105,7 @@
val sparkVersion = "2.3.3"
val gerritApiVersion = "2.13.7"
- val esSpark = "6.2.0"
+ val esSpark = Option(System.getProperty("elasticsearch-spark-20-version")).getOrElse("6.2.0")
val scalaLogging = "3.7.2"
val scopt = "3.6.0"
val scalactic = "3.0.1"