From 649335d6c1dd0884bf6f6618cd56fb480fe40886 Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Thu, 21 Apr 2016 09:57:26 -0700 Subject: [SPARK-14797][BUILD] Spark SQL POM should not hardcode spark-sketch_2.11 dep. Spark SQL's POM hardcodes a dependency on `spark-sketch_2.11`, which causes Scala 2.10 builds to include the `_2.11` dependency. This is harmless since `spark-sketch` is a pure-Java module (see #12334 for a discussion of dropping the Scala version suffixes from these modules' artifactIds), but it's confusing to people looking at the published POMs. This patch fixes this by using `${scala.binary.version}` to substitute the correct suffix, and also adds a set of Maven Enforcer rules to ensure that `_2.11` artifacts are not used in 2.10 builds (and vice-versa). /cc ahirreddy, who spotted this issue. Author: Josh Rosen Closes #12563 from JoshRosen/fix-sketch-scala-version. --- pom.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ sql/core/pom.xml | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8e752c7d5..dfee5d7834 100644 --- a/pom.xml +++ b/pom.xml @@ -2487,6 +2487,31 @@ + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-versions + + enforce + + + + + + *:*_2.11 + + + + + + + + + @@ -2508,6 +2533,31 @@ 2.11.8 2.11 + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-versions + + enforce + + + + + + *:*_2.10 + + + + + + + + +