Skip to content

Commit

Permalink
Feature/remove unused dependencies (#396)
Browse files Browse the repository at this point in the history
* Add a profile for BBC-VHD publish
* Fix shade and remove not needed deps
* Remove unused dependencies
* Update snapshot version
  • Loading branch information
ag-ramachandran authored Jul 22, 2024
1 parent 2b70b39 commit df2550b
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 152 deletions.
204 changes: 53 additions & 151 deletions connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@
</parent>
<dependencies>
<!-- Compile Scope -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${fasterxml.jackson.version}</version>
<exclusions>
<exclusion>
<artifactId>scala-library</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-scala_${scala.version.major}</artifactId>
Expand All @@ -38,51 +27,21 @@
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${fasterxml.jackson.jar.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version.major}.${scala.version.minor}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version.major}.${scala.version.minor}</version>
</dependency>
</dependency>
<dependency>
<groupId>com.microsoft.azure.kusto</groupId>
<artifactId>kusto-data</artifactId>
<version>${kusto.sdk.version}</version>
<exclusions>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j</artifactId>
</exclusion>
<exclusion>
<artifactId>commons-codec</artifactId>
<groupId>commons-codec</groupId>
</exclusion>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
<exclusion>
<artifactId>annotations</artifactId>
<groupId>org.jetbrains</groupId>
</exclusion>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -99,61 +58,11 @@
<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.univocity</groupId>
<artifactId>univocity-parsers</artifactId>
</exclusion>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
</exclusion>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-storage-queue</artifactId>
</exclusion>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-storage-common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-queue</artifactId>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-common</artifactId>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<exclusions>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand All @@ -163,24 +72,25 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-security-keyvault-secrets</artifactId>
<exclusions>
<exclusion>
<artifactId>azure-core-http-netty</artifactId>
<groupId>com.azure</groupId>
</exclusion>
<exclusion>
<artifactId>azure-core</artifactId>
<groupId>com.azure</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Added to avoid ADB issue, ClassNotFoundException: net.minidev.json.JSONAware -->
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${jsonsmart.version}</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!--might need 3.2.0 here for local run query-->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version.major}.${scala.version.minor}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version.major}.${scala.version.minor}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
Expand Down Expand Up @@ -214,53 +124,12 @@
<artifactId>spark-sql_${scala.version.major}</artifactId>
<version>${spark.version.major}.${spark.version.minor}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jackson-annotations</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-databind</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jackson-module-scala_${scala.version.major}</artifactId>
<groupId>com.fasterxml.jackson.module</groupId>
</exclusion>
<exclusion>
<artifactId>scala-library</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-catalyst_${scala.version.major}</artifactId>
<version>${spark.version.major}.${spark.version.minor}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
<exclusion>
<artifactId>jsr305</artifactId>
<groupId>com.google.code.findbugs</groupId>
</exclusion>
<exclusion>
<artifactId>scala-library</artifactId>
<groupId>org.scala-lang</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Test Scope -->
<dependency>
Expand Down Expand Up @@ -471,9 +340,36 @@
<pattern>com.microsoft.azure</pattern>
<shadedPattern>${kusto.shade.prefix}.com.microsoft.azure</shadedPattern>
<excludes>
<exclude>com.microsoft.azure.kusto.data.ClientRequestProperties</exclude>
<exclude>com.microsoft.azure.kusto.data.*</exclude>
<exclude>com.microsoft.azure.kusto.data.auth.*</exclude>
<exclude>com.microsoft.azure.kusto.data.exceptions.*</exclude>
<exclude>com.microsoft.azure.kusto.data.format.*</exclude>
<exclude>com.microsoft.azure.kusto.data.http.*</exclude>
<exclude>com.microsoft.azure.kusto.data.instrumentation.*</exclude>
<exclude>com.microsoft.azure.kusto.ingest.*</exclude>
<exclude>com.microsoft.azure.kusto.ingest.exceptions.*</exclude>
<exclude>com.microsoft.azure.kusto.ingest.resources.*</exclude>
<exclude>com.microsoft.azure.kusto.ingest.result.*</exclude>
<exclude>com.microsoft.azure.kusto.ingest.source.*</exclude>
<exclude>com.microsoft.azure.kusto.ingest.utils.*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>com.azure.xml</pattern>
<shadedPattern>${kusto.shade.prefix}.com.microsoft.xml</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${kusto.shade.prefix}.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>com.univocity.parsers</pattern>
<shadedPattern>${kusto.shade.prefix}.com.univocity.parsers</shadedPattern>
</relocation>
<relocation>
<pattern>com.nimbusds</pattern>
<shadedPattern>${kusto.shade.prefix}.com.nimbusds</shadedPattern>
</relocation>
<relocation>
<pattern>com.microsoft.spark</pattern>
<shadedPattern>${kusto.shade.prefix}.com.microsoft.spark</shadedPattern>
Expand Down Expand Up @@ -639,6 +535,7 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/services/javax.annotation.processing.Processor</exclude>
<exclude>META-INF/*.MF</exclude>
<exclude>META-INF/*.SF</exclude>
Expand All @@ -652,6 +549,12 @@
<include>**</include>
</includes>
</filter>
<filter>
<artifact>com.fasterxml.woodstox:woodstox-core</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
<artifactSet>
<excludes>
Expand Down Expand Up @@ -698,7 +601,6 @@
https://issues.apache.org/jira/browse/MSHADE-371 -->
<resource>META-INF/LICENSE.md</resource>
</transformer>
<!-- TODO moderakh validate that netty native libs e.g, boringssl actually is used. -->
</transformers>
<!-- When true, it will attempt to shade the contents of the java source files when creating the sources jar. -->
<shadeSourcesContent>true</shadeSourcesContent>
Expand Down
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<packaging>pom</packaging>
<version>${revision}</version>
<properties>
<revision>5.2.0-SNAPSHOT</revision>
<revision>5.2.1-SNAPSHOT</revision>
<!-- Spark dependencies -->
<scala.version.major>2.12</scala.version.major>
<scalafmt.plugin.version>1.1.1640084764.9f463a9</scalafmt.plugin.version>
Expand Down Expand Up @@ -164,4 +164,22 @@
</dependency>
</dependencies>
</dependencyManagement>
<!-- create a profile for distribution to BBC-VHD for Synapse tests -->
<profiles>
<profile>
<id>Synapse</id>
<distributionManagement>
<repository>
<id>BBC-VHD_PublicPackages</id>
<url>https://pkgs.dev.azure.com/msdata/A365/_packaging/BBC-VHD_PublicPackages/maven/v1</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>

0 comments on commit df2550b

Please sign in to comment.