forked from confluentinc/kafka-connect-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
647 lines (626 loc) · 29.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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2018 Confluent Inc.
~
~ Licensed under the Confluent Community License (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.confluent.io/confluent-community-license
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.confluent</groupId>
<artifactId>common</artifactId>
<version>6.0.0</version>
</parent>
<groupId>io.confluent</groupId>
<artifactId>kafka-connect-jdbc</artifactId>
<packaging>jar</packaging>
<version>10.6.1-SNAPSHOT</version>
<name>kafka-connect-jdbc</name>
<organization>
<name>Confluent, Inc.</name>
<url>http://confluent.io</url>
</organization>
<url>http://confluent.io</url>
<description>
A Kafka Connect JDBC connector for copying data between databases and Kafka.
</description>
<licenses>
<license>
<name>Confluent Community License</name>
<url>https://www.confluent.io/confluent-community-license</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/confluentinc/kafka-connect-jdbc.git</connection>
<developerConnection>scm:git:[email protected]:confluentinc/kafka-connect-jdbc.git</developerConnection>
<url>https://github.com/confluentinc/kafka-connect-jdbc</url>
<tag>HEAD</tag>
</scm>
<properties>
<derby.version>10.14.2.0</derby.version>
<commons-io.version>2.4</commons-io.version>
<kafka.connect.maven.plugin.version>0.11.1</kafka.connect.maven.plugin.version>
<sqlite-jdbc.version>3.25.2</sqlite-jdbc.version>
<oracle.jdbc.driver.version>19.7.0.0</oracle.jdbc.driver.version>
<mssqlserver.jdbc.driver.version>8.4.1.jre8</mssqlserver.jdbc.driver.version>
<postgresql.version>42.4.1</postgresql.version>
<jtds.driver.version>1.3.1</jtds.driver.version>
<slf4j.version>1.7.36</slf4j.version>
<reload4j.version>1.2.19</reload4j.version>
<licenses.name>Confluent Community License</licenses.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.package.home>target/${project.artifactId}-${project.version}-package</project.package.home>
<maven.release.plugin.version>2.5.3</maven.release.plugin.version>
<testcontainers.version>1.17.3</testcontainers.version>
</properties>
<repositories>
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>confluent</id>
<name>Confluent</name>
<url>https://packages.confluent.io/maven/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<scope>provided</scope>
</dependency>
<!-- JDBC drivers, only included in runtime so they get packaged -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite-jdbc.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<!--
Include all of the production JARs without observability fixes.
See https://www.oracle.com/database/technologies/maven-central-guide.html
-->
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8-production</artifactId>
<version>${oracle.jdbc.driver.version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${mssqlserver.jdbc.driver.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>${jtds.driver.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>${reload4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zonky.test</groupId>
<artifactId>embedded-postgres</artifactId>
<version>1.2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.5.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<type>test-jar</type>
<classifier>test</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_${kafka.scala.version}</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_${kafka.scala.version}</artifactId>
<version>${kafka.version}</version>
<type>test-jar</type>
<classifier>test</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>oracle-xe</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<!-- common pom defines them in dependency management and hence they're pulled in compile scope.
Explicitly define them as test to prevent from them form being packaged. -->
<dependency>
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
<version>${zkclient.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Werror</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>io.confluent</groupId>
<version>${kafka.connect.maven.plugin.version}</version>
<artifactId>kafka-connect-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>kafka-connect</goal>
</goals>
<configuration>
<title>Kafka Connect JDBC</title>
<documentationUrl>https://docs.confluent.io/kafka-connect-jdbc/current/</documentationUrl>
<description>
The JDBC source and sink connectors allow you to exchange data between relational databases and Kafka.
The JDBC source connector allows you to import data from any relational database with a JDBC driver into Kafka topics. By using JDBC, this connector can support a wide variety of databases without requiring custom code for each one.
Data is loaded by periodically executing a SQL query and creating an output record for each row in the result set. By default, all tables in a database are copied, each to its own output topic. The database is monitored for new or deleted tables and adapts automatically. When copying data from a table, the connector can load only new or modified rows by specifying which columns should be used to detect new or modified data.
The JDBC sink connector allows you to export data from Kafka topics to any relational database with a JDBC driver. By using JDBC, this connector can support a wide variety of databases without requiring a dedicated connector for each one. The connector polls data from Kafka to write to the database based on the topics subscription. It is possible to achieve idempotent writes with upserts. Auto-creation of tables, and limited auto-evolution is also supported.
</description>
<logo>logos/jdbc.jpg</logo>
<supportProviderName>Confluent, Inc.</supportProviderName>
<supportSummary>Confluent supports the JDBC sink and source connectors alongside community members as part of its Confluent Platform offering.</supportSummary>
<supportUrl>https://docs.confluent.io/current/</supportUrl>
<supportLogo>logos/confluent.png</supportLogo>
<ownerUsername>confluentinc</ownerUsername>
<ownerType>organization</ownerType>
<ownerName>Confluent, Inc.</ownerName>
<ownerUrl>https://confluent.io/</ownerUrl>
<ownerLogo>logos/confluent.png</ownerLogo>
<dockerNamespace>confluentinc</dockerNamespace>
<dockerName>cp-kafka-connect</dockerName>
<dockerTag>${project.version}</dockerTag>
<componentTypes>
<componentType>sink</componentType>
<componentType>source</componentType>
</componentTypes>
<tags>
<tag>jdbc</tag>
<tag>database</tag>
<tag>dbms</tag>
<tag>rdbms</tag>
<tag>sql</tag>
<tag>mysql</tag>
<tag>postgresql</tag>
<tag>oracle</tag>
<tag>sql server</tag>
<tag>db2</tag>
<tag>sybase</tag>
<tag>vertica</tag>
<tag>sap hana</tag>
<tag>derby</tag>
<tag>sqlite</tag>
</tags>
<confluentControlCenterIntegration>true</confluentControlCenterIntegration>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<!--normal integration tests should not run the memory-restricted tests -->
<id>integration-test</id>
<configuration>
<excludes>
<exclude>**/*OOM*.java</exclude>
</excludes>
<trimStackTrace>false</trimStackTrace>
</configuration>
</execution>
<execution>
<id>integration-test-memory-restricted</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<!-- out-of-memory tests should have a restricted heap size-->
<argLine>@{argLine} -Djava.awt.headless=true -Xmx128M</argLine>
<includes>
<include>**/*OOM*.java</include>
</includes>
<trimStackTrace>false</trimStackTrace>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/development.xml</descriptor>
<descriptor>src/assembly/package.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven.release.plugin.version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<remoteTagging>false</remoteTagging>
<tagNameFormat>v@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>rpm</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>rpm-maven-plugin</artifactId>
<version>2.1.5</version>
<executions>
<execution>
<id>generate-rpm</id>
<goals>
<goal>rpm</goal>
</goals>
</execution>
</executions>
<configuration>
<group>Applications/Internet</group>
<packager>Confluent Packaging</packager>
<license>${licenses.name}</license>
<needarch>noarch</needarch>
<targetOS>linux</targetOS>
<requires>
<require>confluent-common = ${confluent.version}</require>
</requires>
<mappings>
<mapping>
<directory>/usr/share/java/${project.artifactId}</directory>
<sources>
<source>
<location>${project.package.home}/share/java/${project.artifactId}</location>
</source>
</sources>
</mapping>
<mapping>
<configuration>true</configuration>
<directory>/etc/${project.artifactId}</directory>
<sources>
<source>
<location>${project.package.home}/etc/${project.artifactId}</location>
</source>
</sources>
</mapping>
<mapping>
<documentation>true</documentation>
<directory>/usr/share/doc/${project.artifactId}</directory>
<sources>
<source>
<location>${project.package.home}/share/doc/${project.artifactId}</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>standalone</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/standalone.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>licenses-package</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>create-licenses</id>
<configuration>
<mainClass>io.confluent.licenses.LicenseFinder</mainClass>
<arguments>
<!-- Note use of development instead of package so we pick up all dependencies. -->
<argument>-i ${project.build.directory}/${project.build.finalName}-package/share/java/kafka-connect-jdbc</argument>
<argument>-o ${project.basedir}/licenses</argument>
<argument>-f</argument>
<argument>-h ${project.build.directory}/${project.build.finalName}-package/share/doc/kafka-connect-jdbc/licenses.html</argument>
<argument>-l ${project.build.directory}/${project.build.finalName}-package/share/doc/kafka-connect-jdbc/licenses</argument>
<argument>-n ${project.build.directory}/${project.build.finalName}-package/share/doc/kafka-connect-jdbc/notices</argument>
<argument>-t ${project.name}</argument>
<argument>-x licenses-${confluent.version}.jar</argument>
</arguments>
</configuration>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<executableDependency>
<groupId>io.confluent</groupId>
<artifactId>licenses</artifactId>
</executableDependency>
</configuration>
<dependencies>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>licenses</artifactId>
<version>${confluent.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>licenses-source</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>create-licenses</id>
<configuration>
<mainClass>io.confluent.licenses.LicenseFinder</mainClass>
<arguments>
<!-- Note use of development instead of package so we pick up all dependencies. -->
<argument>-i ${project.build.directory}/${project.build.finalName}-development/share/java/kafka-connect-jdbc</argument>
<argument>-o ${project.basedir}/licenses</argument>
<argument>-f</argument>
<argument>-h ${project.basedir}/licenses.html</argument>
<argument>-l ${project.basedir}/licenses</argument>
<argument>-n ${project.basedir}/notices</argument>
<argument>-t ${project.name}</argument>
<argument>-x licenses-${confluent.version}.jar</argument>
</arguments>
</configuration>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<executableDependency>
<groupId>io.confluent</groupId>
<artifactId>licenses</artifactId>
</executableDependency>
</configuration>
<dependencies>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>licenses</artifactId>
<version>${confluent.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<filesets>
<fileset>
<directory>.</directory>
<includes>
<include>licenses.html</include>
<directory>licenses/*.*</directory>
<directory>notices/*.*</directory>
</includes>
<excludes>
<!-- We have to manually keep this files until the license finder properly finds the Oracle license -->
<exclude>licenses/LICENSE-ojdbc*.txt</exclude>
<!-- We have to manually keep this files because the license information in the JAR
uses an invalid URL to the MIT license -->
<exclude>licenses/LICENSE-mssql-jdbc-*.txt</exclude>
</excludes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>