<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2019-2020 StreamThoughts.
  ~
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements. See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.streamthoughts</groupId>
        <artifactId>kafka-connect-file-pulse-reactor</artifactId>
        <version>1.3.1</version>
    </parent>

    <artifactId>kafka-connect-file-pulse-plugin</artifactId>

    <name>Kafka Connect Source File Pulse Plugin</name>
    <description>Connect File Pulse is a multi-purpose source connector for streaming files from a local filesystem to Kafka.</description>

    <organization>
        <name>streamthoughts</name>
        <url>http://streamthoughts.io</url>
    </organization>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <checkstyle.config.location>${project.parent.basedir}</checkstyle.config.location>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>io.confluent</groupId>
                <version>${kafka.connect.maven.plugin.version}</version>
                <artifactId>kafka-connect-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>kafka-connect</goal>
                        </goals>
                        <configuration>
                            <name>kafka-connect-file-pulse</name>
                            <title>Kafka Connect File Pulse</title>
                            <documentationUrl>https://github.com/streamthoughts/kafka-connect-file-pulse</documentationUrl>
                            <sourceUrl>https://github.com/streamthoughts/kafka-connect-file-pulse</sourceUrl>
                            <description>
                                Connect File Pulse is a multi-purpose open-source Kafka Connect(source) plugin for ingesting and transforming data from local files before sending it to a Kafka Apache cluster.
                            </description>
                            <supportProviderName>StreamThoughts</supportProviderName>
                            <supportSummary>This connector is supported by the open source community and StreamThoughts as part of its open source offering.</supportSummary>
                            <supportUrl>https://streamthoughts.io/open-source</supportUrl>

                            <logo>${project.basedir}/../assets/streamthoughts_logo.png</logo>

                            <ownerUsername>streamthoughts</ownerUsername>
                            <ownerType>organization</ownerType>
                            <ownerName>StreamThoughts</ownerName>
                            <ownerUrl>https://streamthoughts.io/</ownerUrl>

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

                            <tags>
                                <tag>filesystem</tag>
                                <tag>files</tag>
                                <tag>grok</tag>
                                <tag>parsing</tag>
                                <tag>log</tag>
                            </tags>

                            <requirements/>

                            <deliveryGuarantee>
                                <deliveryGuarantee>atLeastOnce</deliveryGuarantee>
                            </deliveryGuarantee>

                            <confluentControlCenterIntegration>true</confluentControlCenterIntegration>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/development.xml</descriptor>
                        <descriptor>src/assembly/package.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-make-assembly</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>accept</id>
                        <phase>accept</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <doclint>none</doclint><!-- Turnoff all checks -->
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>standalone</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptors>
                                <descriptor>src/assembly/standalone.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>

        <dependency>
            <groupId>io.streamthoughts</groupId>
            <artifactId>kafka-connect-file-pulse-api</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>io.streamthoughts</groupId>
            <artifactId>kafka-connect-file-pulse-filters</artifactId>
            <version>${version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-connect-avro-converter</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
        </dependency>

        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
        </dependency>

        <!-- START test dependencies-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-schema-registry-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
        </dependency>

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
        </dependency>

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>json-path</artifactId>
        </dependency>

        <!-- END test dependencies-->

    </dependencies>

</project>
