<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright 2017 Confluent Inc.
  ~
  ~ 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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>io.confluent</groupId>
    <artifactId>kafka-connect-packaging-plugins</artifactId>
    <packaging>pom</packaging>
    <name>kafka-connect-packaging-plugins</name>
    <version>0.12.0</version>
    <organization>
        <name>Confluent, Inc.</name>
        <url>https://confluent.io</url>
    </organization>
    <developers>
        <developer>
            <name>Chris Egerton</name>
            <email>chrise@confluent.io</email>
            <organization>Confluent, Inc.</organization>
            <organizationUrl>https://confluent.io</organizationUrl>
        </developer>
        <developer>
            <name>Konstantine Karantasis</name>
            <email>konstantine@confluent.io</email>
            <organization>Confluent, Inc.</organization>
            <organizationUrl>https://confluent.io</organizationUrl>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Adam Berry</name>
            <email>adamb@confluent.io</email>
            <organization>Confluent, Inc.</organization>
            <organizationUrl>https://confluent.io</organizationUrl>
        </contributor>
    </contributors>
    <url>https://confluent.io</url>
    <description>
        Kafka Connect packaging plugins that allow developers to package Connect plugins (Connector, Converters, Transformations) in easily deployable archives supported by the Confluent Platform.
    </description>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/confluentinc/kafka-connect-packaging-plugins.git</connection>
        <developerConnection>scm:git:git@github.com:confluentinc/kafka-connect-packaging-plugins.git</developerConnection>
        <url>https://github.com/confluentinc/kafka-connect-packaging-plugins</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
       <repository>
         <id>confluent-nexus-central</id>
         <name>Internal repo</name>
         <url>https://nexus.confluent.io/repository/maven-public</url>
         <releases>
            <enabled>true</enabled>
         </releases>
         <snapshots>
            <enabled>true</enabled>
         </snapshots>
       </repository>
    </distributionManagement>

    <modules>
        <module>kafka-connect-maven-plugin</module>
    </modules>

    <properties>
        <checkstyle.version>6.19</checkstyle.version>
        <confluent.maven.repo>http://packages.confluent.io/maven/</confluent.maven.repo>
        <jackson.version>2.8.5</jackson.version>
        <junit.version>4.12</junit.version>
        <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
        <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
        <maven-deploy.version>2.8.2</maven-deploy.version>
        <maven-site-plugin.version>3.7.1</maven-site-plugin.version>
        <maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!--children-->
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>maven-kafka-connect-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>maven-central</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <inherited>true</inherited>
                <configuration>
                    <compilerArgs>
                        <arg>-Xlint:-processing,all,-options,-serial,-deprecation,-unchecked</arg>
                        <Werror />
                    </compilerArgs>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>false</showDeprecation>
                    <source>7</source>
                    <target>7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <pushChanges>false</pushChanges>
                    <releaseProfiles>release-sign-artifacts,release</releaseProfiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <reuseForks>false</reuseForks>
                    <forkCount>1</forkCount>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
                            <configLocation>checkstyle/checkstyle.xml</configLocation>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.5</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.9</version>
            </plugin>
        </plugins>
    </build>
</project>
