<!--
  ~ Copyright 2018 Confluent Inc.
  ~
  ~ Licensed under the Confluent Community License (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.confluent.io/confluent-community-license
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  ~ WARRANTIES OF ANY KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations under the License.
  -->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <!-- Assembles a packaged version targeting OS installation. -->
    <id>package</id>
    <formats>
        <format>dir</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>${project.parent.basedir}</directory>
            <outputDirectory>share/doc/kafka-connect-s3/</outputDirectory>
            <includes>
                <include>version.txt</include>
                <include>README*</include>
                <include>LICENSE*</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}</directory>
            <outputDirectory>share/doc/kafka-connect-s3/</outputDirectory>
            <includes>
                <include>licenses.html</include>
                <include>licenses/</include>
                <include>notices/</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/config</directory>
            <outputDirectory>etc/kafka-connect-s3</outputDirectory>
            <includes>
                <include>*</include>
            </includes>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>share/java/kafka-connect-s3</outputDirectory>
            <useProjectArtifact>true</useProjectArtifact>
            <useTransitiveFiltering>true</useTransitiveFiltering>
            <excludes>
                <!-- Exclude these jars during packaging. This avoids conflicts of jars
                shipped with Confluent platform and other dependencies such as Hadoop and Avro.
                This allows correctly setup of CLASSPATH in kafka-run-class.sh when running
                Kafka Connect connectors. -->
                <exclude>io.confluent:kafka-connect-storage-common</exclude>
                <exclude>io.confluent:kafka-connect-storage-core</exclude>
                <exclude>io.confluent:kafka-connect-storage-format</exclude>
                <exclude>io.confluent:kafka-connect-storage-hive</exclude>
                <exclude>io.confluent:kafka-connect-storage-partitioner</exclude>
            </excludes>
        </dependencySet>
    </dependencySets>
</assembly>
