<!--

    Copyright (C) 2017 Jeremy Custenborder (jcustenborder@gmail.com)

    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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.github.jcustenborder</groupId>
        <artifactId>maven-central-parent</artifactId>
        <version>1.0.0.0</version>
    </parent>

    <groupId>io.confluent</groupId>
    <artifactId>kafka-connect-parent</artifactId>
    <version>4.1.0</version>
    <packaging>pom</packaging>
    <name>kafka-connect-parent</name>
    <inceptionYear>2017</inceptionYear>

    <description>Parent pom for Kafka Connect projects.</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <kafka.version>1.1.0</kafka.version>
        <guava.version>18.0</guava.version>
        <reflections.version>0.9.10</reflections.version>
        <jackson.version>2.8.5</jackson.version>
        <connect-utils.version>[0.3.33,0.3.1000)</connect-utils.version>
        <kafka-connect-style.version>[1.1.0.0,1.1.0.1000)</kafka-connect-style.version>
        <confluent.packaging.plugin.version>[0.9.0,0.9.100)</confluent.packaging.plugin.version>
        <mockito.version>2.6.3</mockito.version>
        <junit.version>5.2.0</junit.version>
        <junit.surefire.plugin.version>1.2.0</junit.surefire.plugin.version>
        <surefire.version>2.21.0</surefire.version>
        <failsafe.version>2.21.0</failsafe.version>


        <confluent.hub.packaging.version>0.10.0</confluent.hub.packaging.version>
        <confluent.hub.packaging.ownerUrl>https://confluent.io/</confluent.hub.packaging.ownerUrl>
        <confluent.hub.packaging.ownerUsername>confluentinc</confluent.hub.packaging.ownerUsername>
        <confluent.hub.packaging.ownerType>organization</confluent.hub.packaging.ownerType>
        <confluent.hub.packaging.ownerName>Confluent, Inc.</confluent.hub.packaging.ownerName>
        <confluent.hub.packaging.ownerLogo>logos/confluent.png</confluent.hub.packaging.ownerLogo>
        <confluent.hub.packaging.supportProviderName>Confluent, Inc.</confluent.hub.packaging.supportProviderName>
        <confluent.hub.packaging.supportLogo>logos/confluent.png</confluent.hub.packaging.supportLogo>

    </properties>

    <url>https://github.com/jcustenborder/confluent-kafka-connect-parent</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>

    <developers>
        <developer>
            <id>jcustenborder</id>
            <name>Jeremy Custenborder</name>
            <email>jcustenborder@gmail.com</email>
            <url>https://github.com/jcustenborder</url>
            <timezone>America/Chicago</timezone>
            <roles>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/jcustenborder/confluent-kafka-connect-parent</url>
        <connection>scm:git:https://github.com/jcustenborder/confluent-kafka-connect-parent.git</connection>
        <developerConnection>scm:git:git://git@github.com:jcustenborder/confluent-kafka-connect-parent.git
        </developerConnection>
    </scm>

    <issueManagement>
        <url>https://github.com/jcustenborder/kafka-connect-parent/issues</url>
        <system>github</system>
    </issueManagement>

    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>${reflections.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.jcustenborder.kafka.connect</groupId>
            <artifactId>connect-utils</artifactId>
            <version>${connect-utils.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
            <version>${kafka.version}</version>
            <scope>provided</scope>
        </dependency>


        <dependency>
            <groupId>com.github.jcustenborder.kafka.connect</groupId>
            <artifactId>connect-utils-testing</artifactId>
            <version>${connect-utils.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.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>com.github.jcustenborder</groupId>
            <artifactId>docker-compose-junit-extension</artifactId>
            <version>[0.0.1.1, 0.1.1.1000)</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.1.8</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.3.0</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>1.7</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>${junit.surefire.plugin.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludes>
                        <exclude>**/*IT.java</exclude>
                        <exclude>**/*IntegrationTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${failsafe.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>${junit.surefire.plugin.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</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>3.5.1</version>
                <inherited>true</inherited>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>assembly-single-package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <attach>false</attach>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptorRefs>
                                <descriptorRef>package</descriptorRef>
                            </descriptorRefs>
                            <formats>
                                <format>tar.gz</format>
                            </formats>
                            <tarLongFileMode>posix</tarLongFileMode>
                        </configuration>
                    </execution>
                    <execution>
                        <id>assembly-single-dir</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <attach>false</attach>
                            <finalName>kafka-connect-target</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptorRefs>
                                <descriptorRef>package</descriptorRef>
                            </descriptorRefs>
                            <formats>
                                <format>dir</format>
                            </formats>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.github.jcustenborder.kafka.connect</groupId>
                        <artifactId>kafka-connect-style-assemblies</artifactId>
                        <version>${kafka-connect-style.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>checkstyle.xml</configLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <includeResources>false</includeResources>
                            <includeTestResources>false</includeTestResources>
                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.github.jcustenborder.kafka.connect</groupId>
                        <artifactId>kafka-connect-style-checkstyle</artifactId>
                        <version>${kafka-connect-style.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <header>APACHE-2.txt</header>
                    <properties>
                        <owner>Jeremy Custenborder</owner>
                        <email>jcustenborder@gmail.com</email>
                    </properties>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>src/assembly/**</exclude>
                    </excludes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.github.jcustenborder.kafka.connect</groupId>
                        <artifactId>kafka-connect-style-licensing</artifactId>
                        <version>${kafka-connect-style.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>confluent</id>
            <url>http://packages.confluent.io/maven/</url>
        </repository>
    </repositories>
</project>
