Skip to content

Commit

Permalink
Refactored dependencies and imports for snowflake-jdbc-thin
Browse files Browse the repository at this point in the history
- Replaced shaded Apache HTTP Client with standard packages
- Replaced shaded Google Guava with standard packages
- Replaced shaded Apache commons-io with standard packages
- Replaced shaded Jackson JSON with standard packages
- Replaced shaded Gson with Jackson ObjectMapper in OAuthClient class
- Replaced shaded HttpStatusCodes with HttpURLConnection status codes

- Added UnmodifiableMap class to remove commons-collections dependency from Hadoop
- Added Google HTTP Client 1.43.3
- Added JCL over SLF4J to replace Commons Logging
- Removed unused direct dependency on Jettison
- Removed usage of netty-common PlatformDependent memory value from Netty property
- Removed unused direct dependency on Commons Configuration 2
- Removed unused direct dependency on Commons Compress
- Excluded unused dependencies from Hadoop Common
- Excluded several libraries from Dependency Convergence checking
- Updated allowed license formats

- Updated Apache Avro from 1.11.3 to 1.11.4
- Updated Apache Commons Codec from 1.15 to 1.17.1
- Updated Apache Commons Compress from 1.26.0 to 1.27.1
- Updated Apache Commons Lang3 from 3.14.0 to 3.17.0
- Updated Guava from 32.0.1 to 32.1.1
- Updated Snowflake JDBC from 3.18.0 to 3.19.0
- Updated ThreeTenBP from 1.6.8 to 1.6.9
- Updated Netty from 4.1.113 to 4.1.115
- Updated Nimbus from 9.37.1 to 9.47
  • Loading branch information
exceptionfactory authored and sfc-gh-dseweryn committed Dec 13, 2024
1 parent 5d11892 commit 0d1aaed
Show file tree
Hide file tree
Showing 38 changed files with 423 additions and 216 deletions.
185 changes: 155 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,23 @@

<!-- Set our Language Level to Java 8 -->
<properties>
<apache.httpclient.version>4.5.14</apache.httpclient.version>
<apache.httpcomponents.version>4.4.16</apache.httpcomponents.version>
<avro.version>1.11.4</avro.version>
<bouncycastle.version>1.78.1</bouncycastle.version>
<codehaus.version>1.9.13</codehaus.version>
<commonscodec.version>1.17.1</commonscodec.version>
<commonscollections.version>3.2.2</commonscollections.version>
<commonscompress.version>1.26.2</commonscompress.version>
<commonscompress.version>1.27.1</commonscompress.version>
<commonsconfiguration2.version>2.10.1</commonsconfiguration2.version>
<commonsio.version>2.16.1</commonsio.version>
<commonslang3.version>3.14.0</commonslang3.version>
<commonsio.version>2.17.0</commonsio.version>
<commonslang3.version>3.17.0</commonslang3.version>
<commonslogging.version>1.3.3</commonslogging.version>
<commonstext.version>1.11.0</commonstext.version>
<fasterxml.version>2.17.2</fasterxml.version>
<guava.version>32.0.1-jre</guava.version>
<google.httpclient.version>1.43.3</google.httpclient.version>
<gson.version>2.10.1</gson.version>
<guava.version>32.1.1-jre</guava.version>
<hadoop.version>3.4.0</hadoop.version>
<iceberg.version>1.6.1</iceberg.version>
<jacoco.skip.instrument>true</jacoco.skip.instrument>
Expand All @@ -63,16 +67,17 @@
<maven.compiler.target>1.8</maven.compiler.target>
<net.minidev.version>2.4.9</net.minidev.version>
<netty.version>4.1.115.Final</netty.version>
<nimbusds.version>9.37.3</nimbusds.version>
<nimbusds.version>9.47</nimbusds.version>
<objenesis.version>3.1</objenesis.version>
<parquet.version>1.14.1</parquet.version>
<parquet.version>1.14.4</parquet.version>
<powermock.version>2.0.9</powermock.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<protobuf.version>4.27.5</protobuf.version>
<shadeBase>net.snowflake.ingest.internal</shadeBase>
<slf4j.version>1.7.36</slf4j.version>
<snappy.version>1.1.10.5</snappy.version>
<snowjdbc.version>3.20.0</snowjdbc.version>
<threetenbp.version>1.6.9</threetenbp.version>
<yetus.version>0.13.0</yetus.version>
</properties>

Expand All @@ -85,11 +90,26 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>${google.httpclient.version}</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-gson</artifactId>
<version>${google.httpclient.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
Expand Down Expand Up @@ -137,8 +157,30 @@
</dependency>
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<artifactId>snowflake-jdbc-thin</artifactId>
<version>${snowjdbc.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-context</artifactId>
</exclusion>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
Expand Down Expand Up @@ -173,6 +215,14 @@
<groupId>com.github.pjfanning</groupId>
<artifactId>jersey-json</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.re2j</groupId>
<artifactId>re2j</artifactId>
</exclusion>
<exclusion>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
Expand All @@ -189,10 +239,26 @@
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
</exclusion>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</exclusion>
<exclusion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</exclusion>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</exclusion>
<exclusion>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
Expand All @@ -209,6 +275,10 @@
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
Expand All @@ -225,6 +295,22 @@
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.curator</groupId>
<artifactId>curator-client</artifactId>
Expand All @@ -233,10 +319,18 @@
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hadoop.thirdparty</groupId>
<artifactId>hadoop-shaded-protobuf_3_21</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
Expand All @@ -253,6 +347,10 @@
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
Expand All @@ -279,6 +377,16 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${apache.httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>${apache.httpcomponents.version}</version>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-api</artifactId>
Expand Down Expand Up @@ -308,6 +416,12 @@
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-hadoop</artifactId>
<version>${parquet.version}</version>
<exclusions>
<exclusion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.yetus</groupId>
Expand Down Expand Up @@ -339,11 +453,6 @@
<artifactId>jackson-xc</artifactId>
<version>${codehaus.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
Expand All @@ -354,11 +463,21 @@
<artifactId>objenesis</artifactId>
<version>${objenesis.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
<version>${threetenbp.version}</version>
</dependency>
<dependency>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
Expand Down Expand Up @@ -527,29 +646,17 @@
<artifactId>metrics-jvm</artifactId>
<version>4.1.22</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</dependency>
<!-- Snowflake JDBC used to connect to the service-->
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<artifactId>snowflake-jdbc-thin</artifactId>
</dependency>

<!-- Transitive dependency; declared here to use a specific version -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
Expand All @@ -562,6 +669,14 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-api</artifactId>
Expand Down Expand Up @@ -626,7 +741,7 @@
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>1.5.6-2</version>
<version>1.5.6-5</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -908,7 +1023,15 @@

<banDuplicatePomDependencyVersions/>
<bannedDependencies/>
<dependencyConvergence/>
<dependencyConvergence>
<excludes>
<exclude>commons-io:commons-io</exclude>
<exclude>commons-codec:commons-codec</exclude>
<exclude>org.apache.avro:avro</exclude>
<exclude>org.apache.commons:commons-compress</exclude>
<exclude>org.apache.commons:commons-lang3</exclude>
</excludes>
</dependencyConvergence>
<requireUpperBoundDeps/>
</rules>
</configuration>
Expand Down Expand Up @@ -983,8 +1106,9 @@
<includedLicense>3-Clause BSD License</includedLicense>
<includedLicense>The MIT License</includedLicense>
<includedLicense>EDL 1.0</includedLicense>
<includedLicense>The Go license</includedLicense>
<includedLicense>The Go License</includedLicense>
<includedLicense>Bouncy Castle Licence</includedLicense>
<includedLicense>BSD New license</includedLicense>
</includedLicenses>
<excludedScopes>test,provided,system</excludedScopes>
<failOnBlacklist>true</failOnBlacklist>
Expand All @@ -999,8 +1123,9 @@
|Apache 2</licenseMerge>
<licenseMerge>BSD 2-Clause License
|The BSD License |BSD</licenseMerge>
<licenseMerge>The MIT License|MIT License</licenseMerge>
<licenseMerge>The MIT License|MIT License|MIT license</licenseMerge>
<licenseMerge>3-Clause BSD License|BSD-3-Clause</licenseMerge>
<licenseMerge>The Go License|Go License</licenseMerge>
</licenseMerges>
</configuration>
<executions>
Expand Down Expand Up @@ -1137,7 +1262,7 @@
<configuration>
<artifactSet>
<excludes>
<exclude>net.snowflake:snowflake-jdbc</exclude>
<exclude>net.snowflake:snowflake-jdbc-thin</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>com.github.luben:zstd-jni</exclude>
</excludes>
Expand Down
Loading

0 comments on commit 0d1aaed

Please sign in to comment.