Skip to content

Commit 624b123

Browse files
feat: Update spark connector pom.xml (#445)
1 parent a4ca069 commit 624b123

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</path>
108108
<path>
109109
<groupId>com.google.auto.service</groupId>
110-
<artifactId>auto-service-annotations</artifactId>
110+
<artifactId>auto-service</artifactId>
111111
<version>1.0-rc7</version>
112112
</path>
113113
</annotationProcessorPaths>

pubsublite-spark-sql-streaming/pom.xml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,26 @@
1919
<maven.compiler.target>1.8</maven.compiler.target>
2020
<encoding>UTF-8</encoding>
2121
<scala.version>2.11.12</scala.version>
22+
<scala.version.short>2.11</scala.version.short>
23+
<spark.version>2.4.7</spark.version>
2224
</properties>
2325
<dependencies>
2426
<dependency>
2527
<groupId>org.apache.spark</groupId>
26-
<artifactId>spark-sql_2.11</artifactId>
27-
<version>2.4.7</version>
28+
<artifactId>spark-sql_${scala.version.short}</artifactId>
29+
<version>${spark.version}</version>
2830
<scope>provided</scope>
2931
</dependency>
3032
<dependency>
3133
<groupId>org.apache.spark</groupId>
32-
<artifactId>spark-catalyst_2.11</artifactId>
33-
<version>2.4.7</version>
34+
<artifactId>spark-catalyst_${scala.version.short}</artifactId>
35+
<version>${spark.version}</version>
3436
<scope>provided</scope>
3537
</dependency>
3638
<dependency>
3739
<groupId>org.apache.spark</groupId>
38-
<artifactId>spark-unsafe_2.11</artifactId>
39-
<version>2.4.7</version>
40+
<artifactId>spark-unsafe_${scala.version.short}</artifactId>
41+
<version>${spark.version}</version>
4042
<scope>provided</scope>
4143
</dependency>
4244
<dependency>
@@ -110,7 +112,8 @@
110112
<dependency>
111113
<groupId>org.scala-lang</groupId>
112114
<artifactId>scala-library</artifactId>
113-
<version>2.11.12</version>
115+
<version>${scala.version}</version>
116+
<scope>provided</scope>
114117
</dependency>
115118

116119
<!--test dependencies-->
@@ -176,6 +179,36 @@
176179
<include>com.google.common.**</include>
177180
</includes>
178181
</relocation>
182+
<!-- Take special care of grpc-netty-shaded, it uses the package
183+
io.grpc.netty.shaded.io.grpc.netty, which will cause the
184+
ServicesResourceTransformer to replace both occurrences of io.grpc -->
185+
<relocation>
186+
<pattern>io.grpc.netty.shaded</pattern>
187+
<shadedPattern>
188+
com.google.cloud.pubsublite.repackaged.io.grpc.netty.shaded
189+
</shadedPattern>
190+
</relocation>
191+
<relocation>
192+
<pattern>io</pattern>
193+
<shadedPattern>com.google.cloud.pubsublite.repackaged.io</shadedPattern>
194+
<includes>
195+
<include>io.grpc.**</include>
196+
<include>io.opencensus.**</include>
197+
<include>io.perfmark.**</include>
198+
</includes>
199+
</relocation>
200+
<relocation>
201+
<pattern>META-INF/native/io_grpc_netty_shaded_</pattern>
202+
<shadedPattern>
203+
META-INF/native/com_google_cloud_pubsublite_repackaged_io_grpc_netty_shaded_
204+
</shadedPattern>
205+
</relocation>
206+
<relocation>
207+
<pattern>META-INF/native/libio_grpc_netty_shaded_</pattern>
208+
<shadedPattern>
209+
META-INF/native/libcom_google_cloud_pubsublite_repackaged_io_grpc_netty_shaded_
210+
</shadedPattern>
211+
</relocation>
179212
</relocations>
180213
<shadedArtifactAttached>true</shadedArtifactAttached>
181214
<shadedClassifierName>with-dependencies</shadedClassifierName>

0 commit comments

Comments
 (0)