I need to support 2 different versions of the same library (to support a legacy version), es4hadoop
for Apache Spark.
- Version
6.2.2
(https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-spark-13_2.10/6.2.2) - Version
6.3.2
(https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch-spark-13_2.10/6.3.2)
Both versions have same dependencies (scala-lang and Spark).
Not sure at all about the naming of that, but I would like something like:
implementation(group: 'org.elasticsearch', name: 'elasticsearch-spark-13_' + scalaVersion, version:'6.2.2') {
exclude group: "org.scala-lang"
}
implementation(group: 'org.elasticsearch', name: 'elasticsearch-spark-13_' + scalaVersion, version:'6.3.2') {
exclude group: "org.scala-lang"
relocate org.elasticsearch org.elasticsearch6 // ???
}
so I can use both new and old elasticsearch library, in the same project / JVM.
I know already it's possible to relocate
lib with the shadowJar
plugin, but is it possible to relocate a specific version?