<?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-filepulse-reactor</artifactId>
        <version>2.4.3</version>
    </parent>

    <artifactId>kafka-connect-filepulse-plugin</artifactId>

    <name>Kafka Connect Source File Pulse Plugin</name>
    <description>Connect File Pulse is a multi-purpose source connector for streaming files from filesystems 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>
                                The Kafka Connect FilePulse Connector is a powerful source connector that makes it easy to parse, transform, and load data from the local filesystem, Amazon S3, Azure Blob Storage and Google Cloud Storage. This connector supports a variety of formats equally for all storage systems, e.g., text files, CSV, XML, JSON, Avro, Log4j, etc.
                            </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/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>
                                <tag>csv</tag>
                                <tag>xml</tag>
                                <tag>cloud</tag>
                                <tag>aws</tag>
                                <tag>azure</tag>
                                <tag>gcs</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>
            -->
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.13</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <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>
        <profile>
            <id>one-for-all</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-amazons3-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-azure-storage-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-google-cloud-storage-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-local-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>aws</id>
            <dependencies>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-amazons3-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>gcs</id>
            <dependencies>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-google-cloud-storage-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>azure</id>
            <dependencies>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-azure-storage-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>local</id>
            <dependencies>
                <dependency>
                    <groupId>io.streamthoughts</groupId>
                    <artifactId>kafka-connect-filepulse-local-fs</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>io.streamthoughts</groupId>
            <artifactId>kafka-connect-filepulse-api</artifactId>
            <version>${project.version}</version>
        </dependency>

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

        <dependency>
            <groupId>com.jsoniter</groupId>
            <artifactId>jsoniter</artifactId>
        </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>commons-io</groupId>
            <artifactId>commons-io</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>
        <dependency>
            <groupId>io.streamthoughts</groupId>
            <artifactId>kafka-connect-filepulse-local-fs</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- END test dependencies-->
    </dependencies>

</project>
