Skip to content

Commit 62ed2d0

Browse files
deps: mark conscrypt as a provided dep (#4200)
Conscrypt can't be shaded, keeping it as a runtime dependency is too much effort (trying to keep it in sync with google-cloud-bigtable). Also the current goal is make bigtable-hbase a standalone jar that can be dropped into a classpath. With this in mind, this PR marks conscrypt as a provided dep, that end users can add themselves
1 parent ce597cd commit 62ed2d0

File tree

8 files changed

+33
-71
lines changed
  • bigtable-client-core-parent/bigtable-hbase
  • bigtable-dataflow-parent
  • bigtable-hbase-1.x-parent
  • bigtable-hbase-2.x-parent

8 files changed

+33
-71
lines changed

bigtable-client-core-parent/bigtable-hbase/pom.xml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,6 @@ limitations under the License.
103103
<groupId>io.grpc</groupId>
104104
<artifactId>grpc-api</artifactId>
105105
</dependency>
106-
<dependency>
107-
<!-- See notes in verify-conscrypt-version execution below -->
108-
<groupId>org.conscrypt</groupId>
109-
<artifactId>conscrypt-openjdk-uber</artifactId>
110-
<version>${grpc-conscrypt.version}</version>
111-
<scope>runtime</scope>
112-
</dependency>
113106
<dependency>
114107
<groupId>io.grpc</groupId>
115108
<artifactId>grpc-stub</artifactId>
@@ -255,21 +248,8 @@ limitations under the License.
255248
<version>2.12.1-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} -->
256249

257250
<executions>
258-
<!-- TODO: Remove this once we can properly shade conscrypt:
259-
https://github.com/google/conscrypt/issues/811 -->
260-
261-
<!-- This module doesn't actually need to declare a dependency on
262-
conscrypt, it already has it transitively via bigtable-client-core.
263-
However, the child -shaded artifacts need a version number to manually
264-
promote it. So this module declares the dependency solely to verify
265-
the version in grpc-conscrypt.version is correct.
266-
267-
Ideally we would just shade conscrypt in the -shaded artifacts, but
268-
currently it impossible. So for now we just need to make sure that
269-
after all of shading, we expose it properly.
270-
-->
271251
<execution>
272-
<id>verify-conscrypt-version</id>
252+
<id>verify-mirror-deps-cbt</id>
273253
<phase>verify</phase>
274254
<goals>
275255
<goal>verify-mirror-deps</goal>

bigtable-dataflow-parent/bigtable-beam-import/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,6 @@ limitations under the License.
178178
<artifactId>hbase-shaded-client</artifactId>
179179
</exclusion>
180180

181-
<!-- google-cloud-bigtable pulls in a newer version of this, but we want to match beam's version-->
182-
<exclusion>
183-
<groupId>org.conscrypt</groupId>
184-
<artifactId>conscrypt-openjdk-uber</artifactId>
185-
</exclusion>
186-
187181
<!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
188182
pom.xml files when invoking the build from a parent project. So we have to manually exclude
189183
the dependencies. Note that this works in conjunction with the manually promoted dependencies

bigtable-dataflow-parent/bigtable-hbase-beam/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ limitations under the License.
9494
<artifactId>slf4j-log4j12</artifactId>
9595
</exclusion>
9696

97-
<!-- google-cloud-bigtable pulls in a newer version of this, but we want to match beam's version-->
98-
<exclusion>
99-
<groupId>org.conscrypt</groupId>
100-
<artifactId>conscrypt-openjdk-uber</artifactId>
101-
</exclusion>
102-
10397
<!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
10498
pom.xml files when invoking the build from a parent project. So we have to manually exclude
10599
the dependencies. Note that this works in conjunction with the manually promoted dependencies

bigtable-hbase-1.x-parent/bigtable-hbase-1.x-hadoop/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ limitations under the License.
113113
<artifactId>slf4j-api</artifactId>
114114
<version>${hbase1-hadoop-slf4j.version}</version>
115115
</dependency>
116-
<dependency>
117-
<groupId>org.conscrypt</groupId>
118-
<artifactId>conscrypt-openjdk-uber</artifactId>
119-
<version>${grpc-conscrypt.version}</version>
120-
<scope>runtime</scope>
121-
</dependency>
122116

123117
<!-- Test deps -->
124118
<dependency>

bigtable-hbase-1.x-parent/bigtable-hbase-1.x-shaded/pom.xml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ limitations under the License.
4848
<type>pom</type>
4949
<scope>import</scope>
5050
</dependency>
51+
52+
<!-- Conscrypt can't be shaded, and since we are trying to make this connector a single jar drop in, mark it as provided.
53+
End users can always add it themselves
54+
-->
55+
<dependency>
56+
<groupId>org.conscrypt</groupId>
57+
<artifactId>conscrypt-openjdk-uber</artifactId>
58+
<scope>provided</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.conscrypt</groupId>
62+
<artifactId>conscrypt-openjdk</artifactId>
63+
<scope>provided</scope>
64+
</dependency>
5165
<dependency>
5266
<groupId>org.slf4j</groupId>
5367
<artifactId>slf4j-api</artifactId>
@@ -182,14 +196,6 @@ limitations under the License.
182196
<artifactId>metrics-core</artifactId>
183197
<version>${hbase1-metrics.version}</version>
184198
</dependency>
185-
186-
<!-- See notes in bigtable-client-core/bigtable-hbase/pom.xml#verify-conscrypt-version -->
187-
<dependency>
188-
<groupId>org.conscrypt</groupId>
189-
<artifactId>conscrypt-openjdk-uber</artifactId>
190-
<version>${grpc-conscrypt.version}</version>
191-
<scope>runtime</scope>
192-
</dependency>
193199
<!--needs to be declared as a dependency to be excluded from shading-->
194200
<dependency>
195201
<groupId>com.google.code.findbugs</groupId>
@@ -214,8 +220,8 @@ limitations under the License.
214220
<configuration>
215221
<excludedScopes>test,provided,system</excludedScopes>
216222
<!-- Should mirror the shade plugin exclusions-->
217-
<excludedArtifacts>metrics-core|commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core|findbugs-annotations|conscrypt-openjdk-uber|htrace-core4|jsr305</excludedArtifacts>
218-
<excludedGroups>org.bouncycastle|javax.annotation|org.checkerframework</excludedGroups>
223+
<excludedArtifacts>metrics-core|commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core|findbugs-annotations|htrace-core4|jsr305</excludedArtifacts>
224+
<excludedGroups>javax.annotation|org.checkerframework</excludedGroups>
219225
<generateBundle>true</generateBundle>
220226
</configuration>
221227
</execution>
@@ -272,10 +278,7 @@ limitations under the License.
272278
<exclude>log4j:log4j</exclude>
273279
<exclude>org.apache.htrace:htrace-core</exclude>
274280
<exclude>com.github.stephenc.findbugs:findbugs-annotations</exclude>
275-
<!-- See notes in bigtable-client-core/bigtable-hbase/pom.xml#verify-conscrypt-version -->
276-
<exclude>org.conscrypt:conscrypt-openjdk-uber</exclude>
277281
<exclude>org.apache.htrace:htrace-core4</exclude>
278-
<exclude>org.bouncycastle:*</exclude>
279282
<exclude>javax.annotation:*</exclude>
280283
<exclude>org.checkerframework:*</exclude>
281284
<exclude>com.google.code.findbugs:jsr305</exclude>

bigtable-hbase-2.x-parent/bigtable-hbase-2.x-hadoop/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ limitations under the License.
106106
<artifactId>slf4j-api</artifactId>
107107
<version>${hbase2-hadoop-slf4j.version}</version>
108108
</dependency>
109-
<dependency>
110-
<groupId>org.conscrypt</groupId>
111-
<artifactId>conscrypt-openjdk-uber</artifactId>
112-
<version>${grpc-conscrypt.version}</version>
113-
<scope>runtime</scope>
114-
</dependency>
115109

116110
<!-- Test deps -->
117111
<dependency>

bigtable-hbase-2.x-parent/bigtable-hbase-2.x-shaded/pom.xml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ limitations under the License.
4848
<type>pom</type>
4949
<scope>import</scope>
5050
</dependency>
51+
52+
<!-- Conscrypt can't be shaded, and since we are trying to make this connector a single jar drop in, mark it as provided.
53+
End users can always add it themselves
54+
-->
55+
<dependency>
56+
<groupId>org.conscrypt</groupId>
57+
<artifactId>conscrypt-openjdk-uber</artifactId>
58+
<scope>provided</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.conscrypt</groupId>
62+
<artifactId>conscrypt-openjdk</artifactId>
63+
<scope>provided</scope>
64+
</dependency>
5165
<dependency>
5266
<groupId>org.slf4j</groupId>
5367
<artifactId>slf4j-api</artifactId>
@@ -166,13 +180,6 @@ limitations under the License.
166180
<version>${hbase2-metrics.version}</version>
167181
</dependency>
168182

169-
<!-- See notes in bigtable-client-core/bigtable-hbase/pom.xml#verify-conscrypt-version -->
170-
<dependency>
171-
<groupId>org.conscrypt</groupId>
172-
<artifactId>conscrypt-openjdk-uber</artifactId>
173-
<version>${grpc-conscrypt.version}</version>
174-
<scope>runtime</scope>
175-
</dependency>
176183
<!-- needs to be declared as a dependency to be excluded from shading-->
177184
<dependency>
178185
<groupId>com.google.code.findbugs</groupId>
@@ -197,8 +204,8 @@ limitations under the License.
197204
<configuration>
198205
<excludedScopes>test,provided,system</excludedScopes>
199206
<!--Should match the exclusions of shade plugin-->
200-
<excludedArtifacts>metrics-core|commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core4|audience-annotations|findbugs-annotations|conscrypt-openjdk-uber|jsr305</excludedArtifacts>
201-
<excludedGroups>org.bouncycastle|javax.annotation|org.checkerframework</excludedGroups>
207+
<excludedArtifacts>metrics-core|commons-logging|hbase-shaded-client|slf4j-api|slf4j-log4j12|log4j|htrace-core4|audience-annotations|findbugs-annotations|jsr305</excludedArtifacts>
208+
<excludedGroups>javax.annotation|org.checkerframework</excludedGroups>
202209
<generateBundle>true</generateBundle>
203210
</configuration>
204211
</execution>
@@ -258,9 +265,6 @@ limitations under the License.
258265
<exclude>
259266
com.github.stephenc.findbugs:findbugs-annotations
260267
</exclude>
261-
<!-- See notes in bigtable-client-core/bigtable-hbase/pom.xml#verify-conscrypt-version -->
262-
<exclude>org.conscrypt:conscrypt-openjdk-uber</exclude>
263-
<exclude>org.bouncycastle:*</exclude>
264268
<exclude>javax.annotation:*</exclude>
265269
<exclude>org.checkerframework:*</exclude>
266270
<exclude>com.google.code.findbugs:jsr305</exclude>

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ limitations under the License.
5959
<bigtable.version>2.28.0</bigtable.version>
6060
<google-cloud-bigtable-emulator.version>0.165.0</google-cloud-bigtable-emulator.version>
6161
<bigtable-client-core.version>1.29.2</bigtable-client-core.version>
62-
<grpc-conscrypt.version>2.5.2</grpc-conscrypt.version>
6362
<!-- keeping at this version to align with hbase-->
6463
<slf4j.version>1.7.25</slf4j.version>
6564
<commons-logging.version>1.2</commons-logging.version>

0 commit comments

Comments
 (0)