Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions connector/connect/client/jvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,20 @@
<artifactId>spark-sketch_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<!--
We need to define guava and protobuf here because we need to change the scope of both from
provided to compile. If we don't do this we can't shade these libraries.
-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${connect.guava.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.lihaoyi</groupId>
Expand Down Expand Up @@ -85,59 +95,70 @@
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably broken as well.

<artifactSet>
<includes>
<include>com.google.android:*</include>
<include>com.google.api.grpc:*</include>
<include>com.google.code.findbugs:*</include>
<include>com.google.code.gson:*</include>
<include>com.google.errorprone:*</include>
<include>com.google.guava:*</include>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guava in included by the parent pom.xml.

<include>com.google.j2objc:*</include>
<include>com.google.protobuf:*</include>
<include>com.google.flatbuffers:*</include>
<include>io.grpc:*</include>
<include>io.netty:*</include>
<include>io.perfmark:*</include>
<include>org.apache.arrow:*</include>
<include>org.codehaus.mojo:*</include>
<include>org.checkerframework:*</include>
<include>org.apache.spark:spark-connect-common_${scala.binary.version}</include>
<include>org.apache.spark:spark-sql-api_${scala.binary.version}</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>io.grpc</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.io.grpc</shadedPattern>
<shadedPattern>${spark.shade.packageName}.io.grpc</shadedPattern>
<includes>
<include>io.grpc.**</include>
</includes>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.com.google</shadedPattern>
<shadedPattern>${spark.shade.packageName}.com.google</shadedPattern>
<excludes>
<!-- Guava is relocated to ${spark.shade.packageName}.guava (see the parent pom.xml) -->
<exclude>com.google.common.**</exclude>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hvanhovell , connect uses a separate version of guava, is guava directly using the parent pom as expected?

</excludes>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.io.netty</shadedPattern>
<shadedPattern>${spark.shade.packageName}.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.checkerframework</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.org.checkerframework</shadedPattern>
<shadedPattern>${spark.shade.packageName}.org.checkerframework</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.javax.annotation</shadedPattern>
<shadedPattern>${spark.shade.packageName}.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>io.perfmark</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.io.perfmark</shadedPattern>
<shadedPattern>${spark.shade.packageName}.io.perfmark</shadedPattern>
</relocation>
<relocation>
<pattern>org.codehaus</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.org.codehaus</shadedPattern>
<shadedPattern>${spark.shade.packageName}.org.codehaus</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.arrow</pattern>
<shadedPattern>${spark.shade.packageName}.org.apache.arrow</shadedPattern>
</relocation>
<relocation>
<pattern>android.annotation</pattern>
<shadedPattern>${spark.shade.packageName}.connect.client.android.annotation</shadedPattern>
<shadedPattern>${spark.shade.packageName}.android.annotation</shadedPattern>
</relocation>
</relocations>
<!--SPARK-42228: Add `ServicesResourceTransformer` to relocation class names in META-INF/services for grpc-->
Expand Down