<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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>at.grahsl.kafka.connect</groupId>
    <artifactId>kafka-connect-mongodb</artifactId>
    <version>1.3.0</version>
    <packaging>jar</packaging>

    <name>kafka-connect-mongodb</name>

    <description>A Kafka connect MongoDB sink connector.</description>
    <url>https://github.com/hpgrahsl/kafka-connect-mongodb</url>
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <inceptionYear>2017</inceptionYear>
    <developers>
        <developer>
            <name>Hans-Peter Grahsl</name>
            <email>grahslhp@gmail.com</email>
            <url>https://github.com/hpgrahsl</url>
            <roles>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/hpgrahsl/kafka-connect-mongodb.git</connection>
        <developerConnection>scm:git:ssh://github.com:hpgrahsl/kafka-connect-mongodb.git</developerConnection>
        <url>https://github.com/hpgrahsl/kafka-connect-mongodb/tree/master</url>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/hpgrahsl/kafka-connect-mongodb/issues</url>
    </issueManagement>

    <properties>
        <kafka.version>2.2.0</kafka.version>
        <mongodb.driver.version>3.10.1</mongodb.driver.version>
        <logback.version>1.2.3</logback.version>
        <junit.jupiter.version>5.4.1</junit.jupiter.version>
        <junit.vintage.version>5.4.1</junit.vintage.version>
        <junit.platform.version>1.4.1</junit.platform.version>
        <mockito.version>2.25.1</mockito.version>
        <hamcrest.version>2.0.0.0</hamcrest.version>
        <jackson.version>2.9.8</jackson.version>
        <jacoco.plugin.version>0.8.3</jacoco.plugin.version>
        <codacy.plugin.version>1.1.0</codacy.plugin.version>
        <mvn.jar.plugin.version>3.1.1</mvn.jar.plugin.version>
        <mvn.compiler.plugin.version>3.8.0</mvn.compiler.plugin.version>
        <mvn.assembly.plugin.version>3.1.1</mvn.assembly.plugin.version>
        <mvn.failsafe.plugin.version>2.22.1</mvn.failsafe.plugin.version>
        <skip.integration.test>false</skip.integration.test>
        <testcontainers.version>1.11.1</testcontainers.version>
        <avro.version>1.8.2</avro.version>
        <confluent.serializer.version>5.2.0</confluent.serializer.version>
        <confluent.connect.plugin.version>0.11.1</confluent.connect.plugin.version>
        <ok.http.version>3.14.0</ok.http.version>
        <yaml.beans.version>1.13</yaml.beans.version>
        <nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version>
        <maven.source.plugin.version>3.0.1</maven.source.plugin.version>
        <maven.javadoc.plugin.version>3.1.0</maven.javadoc.plugin.version>
        <maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
            <version>${kafka.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver</artifactId>
            <version>${mongodb.driver.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.jcustenborder.kafka.connect</groupId>
            <artifactId>connect-utils</artifactId>
            <version>[0.2.31,0.2.1000)</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-avro-serializer</artifactId>
            <version>${confluent.serializer.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-connect-maven-plugin</artifactId>
            <version>${confluent.connect.plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit.vintage.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-runner</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-console</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
            <version>${avro.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro-maven-plugin</artifactId>
            <version>${avro.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>${ok.http.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <version>${jackson.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.esotericsoftware.yamlbeans</groupId>
            <artifactId>yamlbeans</artifactId>
            <version>${yaml.beans.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${mvn.jar.plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mvn.compiler.plugin.version}</version>
                <inherited>true</inherited>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${mvn.assembly.plugin.version}</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <outputDirectory>${basedir}/target/kafka-connect-mongodb/</outputDirectory>
                </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-failsafe-plugin</artifactId>
                <version>${mvn.failsafe.plugin.version}</version>
                <configuration>
                    <skipITs>${skip.integration.test}</skipITs>
                    <includes>
                        <include>**/*IT.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>com.gavinmogan</groupId>
                <artifactId>codacy-maven-plugin</artifactId>
                <version>${codacy.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-maven-plugin</artifactId>
                <version>${avro.version}</version>
                <configuration>
                    <stringType>String</stringType>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>schema</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>src/test/resources/avro/</sourceDirectory>
                            <outputDirectory>${project.basedir}/src/test/java/</outputDirectory>
                            <fieldVisibility>PRIVATE</fieldVisibility>
                            <includes>
                                <include>**/*.avsc</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-connect-maven-plugin</artifactId>
                <version>${confluent.connect.plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>kafka-connect</goal>
                        </goals>
                        <configuration>
                            <title>Kafka Connect MongoDB Sink</title>
                            <documentationUrl>https://github.com/hpgrahsl/kafka-connect-mongodb/blob/master/README.md</documentationUrl>
                            <description>It's a basic Apache Kafka Connect SinkConnector which allows moving data from Kafka topics into MongoDB collections.</description>
                            <logo>assets/mongodb-leaf-only.png</logo>
                            <ownerUsername>hpgrahsl</ownerUsername>
                            <ownerType>individual</ownerType>
                            <ownerName>Hans-Peter Grahsl</ownerName>
                            <ownerUrl>https://twitter.com/hpgrahsl</ownerUrl>
                            <supportProviderName>Open Source Community</supportProviderName>
                            <supportSummary>Support provided through community involvement.</supportSummary>
                            <supportUrl>${pom.issueManagement.url}</supportUrl>
                            <confluentControlCenterIntegration>true</confluentControlCenterIntegration>
                            <componentTypes>
                                <componentType>sink</componentType>
                            </componentTypes>
                            <tags>
                                <tag>mongodb</tag>
                                <tag>mongo</tag>
                                <tag>nosql</tag>
                                <tag>json</tag>
                                <tag>bson</tag>
                                <tag>documents</tag>
                                <tag>humongous</tag>
                                <tag>giantideas</tag>
                            </tags>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus.staging.maven.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourcepath>${basedir}/src/main/java/</sourcepath>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
    <repositories>
        <repository>
            <id>confluent</id>
            <url>http://packages.confluent.io/maven/</url>
        </repository>
    </repositories>
</project>