2015-11-17 21:58:34 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
|
|
~ Copyright 2014 Red Hat, Inc. and/or its affiliates.
|
|
|
|
~
|
|
|
|
~ Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
-->
|
|
|
|
<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>
|
|
|
|
<groupId>io.debezium</groupId>
|
|
|
|
<artifactId>debezium-parent</artifactId>
|
|
|
|
<version>0.1-SNAPSHOT</version>
|
|
|
|
<relativePath>../pom.xml</relativePath>
|
|
|
|
</parent>
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
2016-02-02 23:58:48 +01:00
|
|
|
<artifactId>debezium-connector-mysql</artifactId>
|
|
|
|
<name>Debezium Connector for MySQL</name>
|
2015-11-17 21:58:34 +01:00
|
|
|
<packaging>jar</packaging>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>io.debezium</groupId>
|
2015-11-24 22:54:37 +01:00
|
|
|
<artifactId>debezium-core</artifactId>
|
2015-11-17 21:58:34 +01:00
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>mysql</groupId>
|
|
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.github.shyiko</groupId>
|
|
|
|
<artifactId>mysql-binlog-connector-java</artifactId>
|
|
|
|
</dependency>
|
2016-01-22 21:15:55 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.kafka</groupId>
|
|
|
|
<artifactId>connect-api</artifactId>
|
|
|
|
</dependency>
|
2015-11-17 21:58:34 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.slf4j</groupId>
|
|
|
|
<artifactId>slf4j-api</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<!-- Testing -->
|
|
|
|
<dependency>
|
|
|
|
<groupId>io.debezium</groupId>
|
2015-11-24 22:54:37 +01:00
|
|
|
<artifactId>debezium-core</artifactId>
|
2015-11-17 21:58:34 +01:00
|
|
|
<type>test-jar</type>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.slf4j</groupId>
|
|
|
|
<artifactId>slf4j-log4j12</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>log4j</groupId>
|
|
|
|
<artifactId>log4j</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.easytesting</groupId>
|
|
|
|
<artifactId>fest-assert</artifactId>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<properties>
|
|
|
|
<!--
|
|
|
|
Specify the properties that will be used for setting up the integration tests' Docker container.
|
|
|
|
Note that the `dockerhost.ip` property is computed from the IP address of DOCKER_HOST, which will
|
|
|
|
work on all platforms. We'll set some of these as system properties during integration testing.
|
|
|
|
-->
|
|
|
|
<database.port>3306</database.port>
|
2015-11-24 22:54:37 +01:00
|
|
|
<database.user>mysqluser</database.user>
|
2015-11-17 21:58:34 +01:00
|
|
|
<database.password>mysqlpw</database.password>
|
|
|
|
</properties>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<!-- Build a Docker image of our MySQL installation, and run it as a container for our integration tests -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.jolokia</groupId>
|
|
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<watchInterval>500</watchInterval>
|
|
|
|
<logDate>default</logDate>
|
|
|
|
<verbose>true</verbose>
|
|
|
|
<autoPull>always</autoPull>
|
|
|
|
<images>
|
|
|
|
<image>
|
|
|
|
<name>debezium-mysql57-server</name>
|
|
|
|
<alias>database</alias>
|
|
|
|
<build>
|
|
|
|
<assembly>
|
|
|
|
<basedir>/docker-entrypoint-initdb.d</basedir>
|
|
|
|
<dockerFileDir>${project.basedir}/src/test/docker</dockerFileDir>
|
|
|
|
</assembly>
|
|
|
|
</build>
|
|
|
|
<run>
|
|
|
|
<namingStrategy>alias</namingStrategy>
|
|
|
|
<!--volumes>
|
|
|
|
<bind>
|
|
|
|
<volume>${project.build.directory}/data:/var/lib/postgresql/data</volume>
|
|
|
|
</bind>
|
|
|
|
</volumes-->
|
|
|
|
<env>
|
|
|
|
<MYSQL_ROOT_PASSWORD>debezium-rocks</MYSQL_ROOT_PASSWORD>
|
|
|
|
<MYSQL_DATABASE>mysql</MYSQL_DATABASE> <!-- database created upon init -->
|
2015-11-24 22:54:37 +01:00
|
|
|
<MYSQL_USER>${database.user}</MYSQL_USER>
|
2015-11-17 21:58:34 +01:00
|
|
|
<MYSQL_PASSWORD>${database.password}</MYSQL_PASSWORD>
|
|
|
|
</env>
|
|
|
|
<ports>
|
|
|
|
<port>${database.port}:3306</port>
|
|
|
|
</ports>
|
|
|
|
<log>
|
|
|
|
<prefix>mysql</prefix>
|
|
|
|
<enabled>true</enabled>
|
|
|
|
<color>yellow</color>
|
|
|
|
</log>
|
|
|
|
<wait>
|
|
|
|
<log>MySQL init process done. Ready for start up.</log>
|
2015-11-18 22:14:30 +01:00
|
|
|
<time>30000</time> <!-- 30 seconds max -->
|
2015-11-17 21:58:34 +01:00
|
|
|
</wait>
|
|
|
|
</run>
|
|
|
|
</image>
|
|
|
|
</images>
|
|
|
|
</configuration>
|
|
|
|
<!--
|
|
|
|
Connect this plugin to the maven lifecycle around the integration-test phase:
|
|
|
|
start the container in pre-integration-test and stop it in post-integration-test.
|
|
|
|
-->
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>start</id>
|
|
|
|
<phase>pre-integration-test</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>build</goal>
|
|
|
|
<goal>start</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>stop</id>
|
|
|
|
<phase>post-integration-test</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>stop</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<!--
|
|
|
|
Unlike surefire, the failsafe plugin ensures 'post-integration-test' phase always runs, even
|
|
|
|
when there are failed integration tests. We rely upon this to always shut down the Docker container
|
|
|
|
after the integration tests (defined as '*IT.java') are run.
|
|
|
|
-->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>integration-test</id>
|
|
|
|
<goals>
|
|
|
|
<goal>integration-test</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<id>verify</id>
|
|
|
|
<goals>
|
|
|
|
<goal>verify</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
<configuration>
|
|
|
|
<systemPropertyVariables>
|
|
|
|
<!-- Make these available to the tests via system properties -->
|
2016-01-25 20:58:23 +01:00
|
|
|
<database.hostname>${docker.host.address}</database.hostname>
|
2015-11-17 21:58:34 +01:00
|
|
|
<database.port>${database.port}</database.port>
|
2015-11-24 22:54:37 +01:00
|
|
|
<database.user>${database.user}</database.user>
|
2015-11-17 21:58:34 +01:00
|
|
|
<database.password>${database.password}</database.password>
|
2016-02-04 22:35:27 +01:00
|
|
|
<skipLongRunningTests>${skipLongRunningTests}</skipLongRunningTests>
|
2015-11-17 21:58:34 +01:00
|
|
|
</systemPropertyVariables>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
<!-- Extract from $DOCKER_HOST the IP address of the host that will run our Docker images -->
|
2016-01-25 20:58:23 +01:00
|
|
|
<!--
|
2015-11-17 21:58:34 +01:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>regex-property</id>
|
|
|
|
<phase>validate</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>regex-property</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<name>dockerhost.ip</name>
|
|
|
|
<value>${env.DOCKER_HOST}</value>
|
|
|
|
<regex>.*://(\d+)\.(\d+)\.(\d+)\.(\d+):.*</regex>
|
|
|
|
<replacement>$1.$2.$3.$4</replacement>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2016-01-25 20:58:23 +01:00
|
|
|
-->
|
2015-11-17 21:58:34 +01:00
|
|
|
</plugins>
|
|
|
|
<resources>
|
|
|
|
<!-- Apply the properties set in the POM to the resource files -->
|
|
|
|
<resource>
|
|
|
|
<filtering>true</filtering>
|
|
|
|
<directory>src/main/resources</directory>
|
|
|
|
<includes>
|
|
|
|
<include>*</include>
|
|
|
|
<include>**/*</include>
|
|
|
|
</includes>
|
|
|
|
</resource>
|
|
|
|
</resources>
|
|
|
|
<testResources>
|
|
|
|
<testResource>
|
|
|
|
<directory>src/test/resources</directory>
|
|
|
|
<filtering>true</filtering>
|
|
|
|
<includes>
|
|
|
|
<include>*</include>
|
|
|
|
<include>**/*</include>
|
|
|
|
</includes>
|
|
|
|
</testResource>
|
2015-11-24 22:54:37 +01:00
|
|
|
</testResources>
|
2015-11-17 21:58:34 +01:00
|
|
|
</build>
|
|
|
|
</project></project>
|