-
Notifications
You must be signed in to change notification settings - Fork 177
/
pom.xml
308 lines (294 loc) · 11.6 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2017 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>bigtable-hbase-2.x-parent</artifactId>
<groupId>com.google.cloud.bigtable</groupId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bigtable-hbase-2.x-hadoop</artifactId>
<description>
Bigtable connector compatible with HBase 2.x. It most of its dependencies
(hbase & grpc). Its mainly intended to be used by dataflow 2.x to avoid
version conflicts with grpc & protobuf. Prefer to use
bigtable-hbase-2.x.
</description>
<properties>
<!-- define a property that can be ignored by renovate -->
<hbase2-hadoop-slf4j.version>1.7.30</hbase2-hadoop-slf4j.version>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>bigtable-hbase-2.x-shaded</artifactId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<exclusions>
<exclusion>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-shaded-client</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
<!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
pom.xml files when invoking the build from a parent project. So we have to manually exclude
the dependencies. Note that this works in conjunction with the manually promoted dependencies
in bigtable-hbase-2.x-shaded/pom.xml -->
<exclusion>
<groupId>${project.groupId}</groupId>
<artifactId>bigtable-hbase-2.x</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-metrics-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.opencensus</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-census</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>${hbase2.version}</version>
</dependency>
<!-- Manually promote dependencies: This is necessary to avoid flattening hbase-shaded-client's dependency tree -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>${hbase2-metrics.version}</version>
<exclusions>
<!-- see slf4j notes below -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- unlike hbase-shaded-client, hbase-client depends on slf4j 1.6.1.
Which is older than the version requested by metrics-core. However,
metrics-core will work fine with the older version and we want to stay
compatible with hbase-client deps -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${hbase2-hadoop-slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk-uber</artifactId>
<version>${grpc-conscrypt.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Test deps -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- disable google-cloud-shared-config enforcement checks because
hbase-client's dependency subtree doesn't follow the same rules and is
unable to be fixed here -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<!-- hbase-client doesnt align slf4j-api & slf4j-log4j -->
<execution>
<id>enforce-version-consistency-slf4j</id>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<!-- This must be a drop in replacement for hbase-client, so can't
manage hbase's deps -->
<execution>
<id>enforce-banned-deps</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.0</version>
<executions>
<execution>
<id>default-cli</id>
<phase>generate-resources</phase>
<goals>
<goal>add-third-party</goal>
<!-- <goal>download-licenses</goal>-->
</goals>
<configuration>
<excludedScopes>test,provided,system</excludedScopes>
<!--Should match the artifactset for shade plugin-->
<includedArtifacts>com.google.cloud.bigtable:bigtable-hbase-2.x-shaded</includedArtifacts>
<generateBundle>true</generateBundle>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>true</createDependencyReducedPom>
<!-- Need to manually promote to dependencies to keep the structure of hbase-shade-client -->
<promoteTransitiveDependencies>
false
</promoteTransitiveDependencies>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<artifactSet>
<includes>
<include>
com.google.cloud.bigtable:bigtable-hbase-2.x-shaded
</include>
</includes>
</artifactSet>
<relocations>
<!-- Undo the relocation that hbase-shaded-client did to make it compatible with the regular hbase-client -->
<relocation>
<pattern>
org.apache.hadoop.hbase.shaded.com.google.protobuf
</pattern>
<shadedPattern>com.google.protobuf</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.bigtable.test</groupId>
<artifactId>bigtable-build-helper</artifactId>
<version>2.12.0</version> <!-- {x-version-update:bigtable-client-parent:current} -->
<executions>
<execution>
<id>verify-shaded-jar-entries</id>
<phase>verify</phase>
<goals>
<goal>verify-shaded-jar-entries</goal>
</goals>
<configuration>
<allowedJarClassEntries>
<classEntry>com/google/bigtable</classEntry>
<classEntry>com/google/cloud/bigtable</classEntry>
<classEntry>org/apache/hadoop/hbase/client/AbstractBigtableAdmin</classEntry>
<classEntry>org/apache/hadoop/hbase/client/AbstractBigtableConnection</classEntry>
<classEntry>org/apache/hadoop/hbase/client/BigtableAsyncConnection</classEntry>
<classEntry>org/apache/hadoop/hbase/client/BigtableConnectionRegistry</classEntry>
<classEntry>org/apache/hadoop/hbase/client/BigtableAsyncRegistry</classEntry>
<classEntry>org/apache/hadoop/hbase/client/CommonConnection</classEntry>
</allowedJarClassEntries>
</configuration>
</execution>
<execution>
<id>verify-shaded-exclusions</id>
<phase>verify</phase>
<goals>
<goal>verify-shaded-exclusions</goal>
</goals>
</execution>
<execution>
<id>verify-mirror-deps</id>
<phase>verify</phase>
<goals>
<goal>verify-mirror-deps</goal>
</goals>
<configuration>
<targetDependencies>
<targetDependency>org.apache.hbase:hbase-client:${hbase2.version}</targetDependency>
</targetDependencies>
<ignoredDependencies>
<!-- There are 3 users of this dep: us, httpclient & hbase2.
httpclient requires a higher version than hbase, so for now,
we are using that version -->
<ignoredDependency>commons-logging:commons-logging</ignoredDependency>
</ignoredDependencies>
</configuration>
</execution>
</executions>
</plugin>
<!-- skip for shaded jar-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredDependencies>
<dependency>*</dependency>
</ignoredDependencies>
</configuration>
</plugin>
<!-- skip for shaded jar-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>