Skip to content

Commit

Permalink
* attempt shading of spark jars that were having a classpath issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ag-ramachandran committed Feb 8, 2024
1 parent d1b7738 commit df49df2
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,65 @@
<configLocation>${project.parent.basedir}/.scalafmt.conf</configLocation> <!-- path to config -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<!--Create shaded JAR only-->
<shadedArtifactAttached>false</shadedArtifactAttached>
<!--Remove original replaced dependencies-->
<createDependencyReducedPom>true</createDependencyReducedPom>
<!--Promotes transitive dependencies of removed dependencies to direct-->
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<transformers>
<!--Transforms META-INF/services (essential if you relocate com.azure classes)-->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<finalName>${project.artifactId}-${project.version}</finalName>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/maven/**</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>kusto.shaded.com.fasterxml.jackson</shadedPattern>
</relocation>
<relocation>
<!--Environment like Databricks may bring its own version of azure-core which may be incompatible with your Azure client libraries.
Relocate azure-core to avoid collisions with it-->
<pattern>com.azure</pattern>
<shadedPattern>kusto.shaded.com.azure</shadedPattern>
</relocation>
<!--In Databricks 10.2 you nay also need to relocate reactor netty packages-->
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>kusto.shaded.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>reactor</pattern>
<shadedPattern>kusto.shaded.reactor</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit df49df2

Please sign in to comment.