<?xml version="1.0" encoding="UTF-8"?>
<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>
        <artifactId>kafka-connect-http-parent</artifactId>
        <groupId>com.github.castorm</groupId>
        <version>0.8.4</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>kafka-connect-http</artifactId>
    <name>Kafka Connect HTTP</name>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>logging-interceptor</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>
        <dependency>
            <groupId>com.joestelmach</groupId>
            <artifactId>natty</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>package</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.3.0</version>
                        <executions>
                            <execution>
                                <id>assemble-confluent-hub</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <finalName>${project.groupId}-${project.artifactId}-${project.version}</finalName>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <descriptors>
                                        <descriptor>kafka-connect-http/src/assembly/package.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                            <execution>
                                <id>assemble-plugin</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <formats>
                                        <format>tar.gz</format>
                                    </formats>
                                    <tarLongFileMode>posix</tarLongFileMode>
                                    <descriptors>
                                        <descriptor>kafka-connect-http/src/assembly/plugin.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>io.confluent</groupId>
                        <version>0.11.3</version>
                        <artifactId>kafka-connect-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>kafka-connect</goal>
                                </goals>
                                <configuration>
                                    <title>${project.name}</title>
                                    <name>${project.artifactId}</name>
                                    <documentationUrl>${project.parent.url}</documentationUrl>
                                    <description>${project.parent.description}</description>
                                    <version>${project.version}</version>
                                    <supportProviderName>${project.parent.organization.name}</supportProviderName>
                                    <supportSummary>Cástor Rodríguez supports the HTTP plugin alongside other contributors of
                                        this open source project.
                                    </supportSummary>
                                    <supportUrl>${project.parent.issueManagement.url}</supportUrl>

                                    <ownerUsername>castorm</ownerUsername>
                                    <ownerType>user</ownerType>
                                    <ownerName>Cástor Rodríguez</ownerName>
                                    <ownerUrl>https://castorm.es</ownerUrl>

                                    <componentTypes>
                                        <componentType>source</componentType>
                                    </componentTypes>

                                    <tags>
                                        <tag>http</tag>
                                        <tag>rest</tag>
                                        <tag>api</tag>
                                        <tag>json</tag>
                                        <tag>cdc</tag>
                                        <tag>change-data-capture</tag>
                                    </tags>

                                    <requirements>
                                        <requirement>HTTP resource to perform requests against</requirement>
                                        <requirement>To perform change-data-capture with effectively-once delivery
                                            guarantees, the HTTP resource should allow ordering and filtering by one or
                                            more monotonically increasing properties such as sequence numbers or
                                            timestamps
                                        </requirement>
                                    </requirements>

                                    <deliveryGuarantee>
                                        <deliveryGuarantee>exactlyOnce</deliveryGuarantee>
                                    </deliveryGuarantee>

                                    <confluentControlCenterIntegration>false</confluentControlCenterIntegration>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>2.0.0</version>
                        <configuration>
                            <licenseName>apache_v2</licenseName>
                            <excludes>
                                <exclude>**/*.json</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>first</id>
                                <goals>
                                    <goal>update-file-header</goal>
                                </goals>
                                <phase>process-sources</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <source>${java.version}</source>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sign</id>
            <properties>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ossrh</id>
            <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.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

</project>