Skip to content

Commit 46c5d4b

Browse files
committed
[SPARK-53958][BUILD] Simplify Jackson deps management by using BOM
1 parent 2bb73fb commit 46c5d4b

File tree

9 files changed

+11
-97
lines changed

9 files changed

+11
-97
lines changed

connector/kafka-0-10-sql/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,6 @@
104104
<version>${kafka.version}</version>
105105
<scope>test</scope>
106106
<exclusions>
107-
<exclusion>
108-
<groupId>com.fasterxml.jackson.core</groupId>
109-
<artifactId>jackson-core</artifactId>
110-
</exclusion>
111-
<exclusion>
112-
<groupId>com.fasterxml.jackson.core</groupId>
113-
<artifactId>jackson-databind</artifactId>
114-
</exclusion>
115-
<exclusion>
116-
<groupId>com.fasterxml.jackson.core</groupId>
117-
<artifactId>jackson-annotations</artifactId>
118-
</exclusion>
119107
<exclusion>
120108
<groupId>commons-logging</groupId>
121109
<artifactId>commons-logging</artifactId>

connector/kafka-0-10/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,6 @@
8080
<version>${kafka.version}</version>
8181
<scope>test</scope>
8282
<exclusions>
83-
<exclusion>
84-
<groupId>com.fasterxml.jackson.core</groupId>
85-
<artifactId>jackson-core</artifactId>
86-
</exclusion>
87-
<exclusion>
88-
<groupId>com.fasterxml.jackson.core</groupId>
89-
<artifactId>jackson-databind</artifactId>
90-
</exclusion>
91-
<exclusion>
92-
<groupId>com.fasterxml.jackson.core</groupId>
93-
<artifactId>jackson-annotations</artifactId>
94-
</exclusion>
9583
<exclusion>
9684
<groupId>commons-logging</groupId>
9785
<artifactId>commons-logging</artifactId>

connector/kinesis-asl/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@
7575
</exclusion>
7676
</exclusions>
7777
</dependency>
78-
<!-- manage this up explicitly to match Spark; com.amazonaws:aws-java-sdk-pom specifies
79-
2.6.7 but says we can manage it up -->
80-
<dependency>
81-
<groupId>com.fasterxml.jackson.dataformat</groupId>
82-
<artifactId>jackson-dataformat-cbor</artifactId>
83-
<version>${fasterxml.jackson.version}</version>
84-
</dependency>
8578
<dependency>
8679
<groupId>org.mockito</groupId>
8780
<artifactId>mockito-core</artifactId>

core/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -491,18 +491,6 @@
491491
<groupId>commons-logging</groupId>
492492
<artifactId>commons-logging</artifactId>
493493
</exclusion>
494-
<exclusion>
495-
<groupId>com.fasterxml.jackson.core</groupId>
496-
<artifactId>jackson-core</artifactId>
497-
</exclusion>
498-
<exclusion>
499-
<groupId>com.fasterxml.jackson.core</groupId>
500-
<artifactId>jackson-databind</artifactId>
501-
</exclusion>
502-
<exclusion>
503-
<groupId>com.fasterxml.jackson.core</groupId>
504-
<artifactId>jackson-annotations</artifactId>
505-
</exclusion>
506494
<!-- Keep old SDK out of the assembly to avoid conflict with Kinesis module -->
507495
<exclusion>
508496
<groupId>com.amazonaws</groupId>

hadoop-cloud/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@
146146
<dependency>
147147
<groupId>com.fasterxml.jackson.dataformat</groupId>
148148
<artifactId>jackson-dataformat-cbor</artifactId>
149-
<version>${fasterxml.jackson.version}</version>
150149
</dependency>
151150
<!--Explicit declaration to force in Spark version into transitive dependencies -->
152151
<dependency>

pom.xml

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@
185185
<scalafmt.validateOnly>true</scalafmt.validateOnly>
186186
<scalafmt.changedOnly>true</scalafmt.changedOnly>
187187
<fasterxml.jackson.version>2.19.2</fasterxml.jackson.version>
188-
<fasterxml.jackson.databind.version>2.19.2</fasterxml.jackson.databind.version>
189188
<ws.xmlschema.version>2.3.1</ws.xmlschema.version>
190189
<snappy.version>1.1.10.8</snappy.version>
191190
<netlib.ludovic.dev.version>3.0.4</netlib.ludovic.dev.version>
@@ -1063,29 +1062,11 @@
10631062
<version>${codahale.metrics.version}</version>
10641063
</dependency>
10651064
<dependency>
1066-
<groupId>com.fasterxml.jackson.core</groupId>
1067-
<artifactId>jackson-core</artifactId>
1068-
<version>${fasterxml.jackson.version}</version>
1069-
</dependency>
1070-
<dependency>
1071-
<groupId>com.fasterxml.jackson.core</groupId>
1072-
<artifactId>jackson-databind</artifactId>
1073-
<version>${fasterxml.jackson.databind.version}</version>
1074-
</dependency>
1075-
<dependency>
1076-
<groupId>com.fasterxml.jackson.core</groupId>
1077-
<artifactId>jackson-annotations</artifactId>
1078-
<version>${fasterxml.jackson.version}</version>
1079-
</dependency>
1080-
<dependency>
1081-
<groupId>com.fasterxml.jackson.datatype</groupId>
1082-
<artifactId>jackson-datatype-jsr310</artifactId>
1083-
<version>${fasterxml.jackson.version}</version>
1084-
</dependency>
1085-
<dependency>
1086-
<groupId>com.fasterxml.jackson.module</groupId>
1087-
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
1065+
<groupId>com.fasterxml.jackson</groupId>
1066+
<artifactId>jackson-bom</artifactId>
10881067
<version>${fasterxml.jackson.version}</version>
1068+
<scope>import</scope>
1069+
<type>pom</type>
10891070
</dependency>
10901071
<dependency>
10911072
<groupId>org.apache.ws.xmlschema</groupId>
@@ -1164,12 +1145,6 @@
11641145
<groupId>org.json4s</groupId>
11651146
<artifactId>json4s-jackson_${scala.binary.version}</artifactId>
11661147
<version>4.0.7</version>
1167-
<exclusions>
1168-
<exclusion>
1169-
<groupId>com.fasterxml.jackson.core</groupId>
1170-
<artifactId>*</artifactId>
1171-
</exclusion>
1172-
</exclusions>
11731148
</dependency>
11741149
<dependency>
11751150
<groupId>org.scala-lang.modules</groupId>
@@ -2528,14 +2503,6 @@
25282503
<artifactId>arrow-vector</artifactId>
25292504
<version>${arrow.version}</version>
25302505
<exclusions>
2531-
<exclusion>
2532-
<groupId>com.fasterxml.jackson.core</groupId>
2533-
<artifactId>jackson-annotations</artifactId>
2534-
</exclusion>
2535-
<exclusion>
2536-
<groupId>com.fasterxml.jackson.core</groupId>
2537-
<artifactId>jackson-core</artifactId>
2538-
</exclusion>
25392506
<exclusion>
25402507
<groupId>io.netty</groupId>
25412508
<artifactId>netty-common</artifactId>

project/SparkBuild.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import sbt.Classpaths.publishOrSkip
3131
import sbt.Keys._
3232
import sbt.librarymanagement.{ VersionNumber, SemanticSelector }
3333
import com.etsy.sbt.checkstyle.CheckstylePlugin.autoImport._
34+
import com.here.bom.Bom
3435
import com.simplytyped.Antlr4Plugin._
3536
import sbtpomreader.{PomBuild, SbtPomKeys}
3637
import com.typesafe.tools.mima.plugin.MimaKeys
@@ -1096,8 +1097,11 @@ object KubernetesIntegrationTests {
10961097
*/
10971098
object DependencyOverrides {
10981099
lazy val guavaVersion = sys.props.get("guava.version").getOrElse("33.4.0-jre")
1099-
lazy val settings = Seq(
1100+
lazy val jacksonVersion = sys.props.get("fasterxml.jackson.version").getOrElse("2.19.2")
1101+
lazy val jacksonDeps = Bom.dependencies("com.fasterxml.jackson" % "jackson-bom" % jacksonVersion)
1102+
lazy val settings = jacksonDeps ++ Seq(
11001103
dependencyOverrides += "com.google.guava" % "guava" % guavaVersion,
1104+
dependencyOverrides ++= jacksonDeps.key.value,
11011105
dependencyOverrides += "jline" % "jline" % "2.14.6",
11021106
dependencyOverrides += "org.apache.avro" % "avro" % "1.12.0")
11031107
}

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ addSbtPlugin("com.github.sbt" % "sbt-pom-reader" % "2.5.0")
4444
addSbtPlugin("com.github.sbt.junit" % "sbt-jupiter-interface" % "0.17.0")
4545

4646
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")
47+
48+
addSbtPlugin("com.here.platform" % "sbt-bom" % "1.0.29")

resource-managers/kubernetes/core/pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@
110110
<artifactId>kubernetes-client</artifactId>
111111
<version>${kubernetes-client.version}</version>
112112
<exclusions>
113-
<exclusion>
114-
<groupId>com.fasterxml.jackson.core</groupId>
115-
<artifactId>*</artifactId>
116-
</exclusion>
117-
<exclusion>
118-
<groupId>com.fasterxml.jackson.dataformat</groupId>
119-
<artifactId>jackson-dataformat-yaml</artifactId>
120-
</exclusion>
121113
<!-- SPARK-28765 Unused JDK11-specific dependency -->
122114
<exclusion>
123115
<groupId>javax.annotation</groupId>
@@ -126,13 +118,6 @@
126118
</exclusions>
127119
</dependency>
128120

129-
<!-- Required by kubernetes-client but we exclude it -->
130-
<dependency>
131-
<groupId>com.fasterxml.jackson.dataformat</groupId>
132-
<artifactId>jackson-dataformat-yaml</artifactId>
133-
<version>${fasterxml.jackson.version}</version>
134-
</dependency>
135-
136121
<!-- Explicitly depend on shaded dependencies from the parent, since shaded deps aren't transitive -->
137122
<dependency>
138123
<groupId>com.google.guava</groupId>

0 commit comments

Comments
 (0)