<?xml version="1.0"?>
<!--

    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.

-->
<component 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">
  <dependencySets>
    <dependencySet>
      <!-- Now, select which projects to include in this module-set. -->
      <includes>
        <include>org.apache.drill.exec:drill-jdbc:jar</include>
        <include>org.apache.drill:drill-protocol:jar</include>
        <include>org.apache.drill:drill-common:jar</include>
        <include>org.apache.drill:drill-logical:jar</include>
        <include>org.apache.drill.exec:vector:jar</include>
        <include>org.apache.drill.memory:drill-memory-base:jar</include>
        <include>org.apache.drill.exec:drill-rpc:jar</include>
        <include>org.apache.drill.exec:drill-java-exec:jar</include>
        <include>org.apache.drill.metastore:drill-metastore-api:jar</include>
        <include>org.apache.drill.metastore:drill-iceberg-metastore:jar</include>
        <include>org.apache.drill.contrib.storage-hive:drill-storage-hive-core:jar</include>
        <include>org.apache.drill.contrib.storage-hive:drill-hive-exec-shaded:jar</include>
        <include>org.apache.drill.contrib.data:tpch-sample-data:jar</include>
        <include>org.apache.drill.contrib:drill-mongo-storage:jar</include>
        <include>org.apache.drill.contrib:drill-storage-hbase:jar</include>
        <include>org.apache.drill.contrib:drill-format-mapr:jar</include>
        <include>org.apache.drill.contrib:drill-format-syslog:jar</include>
        <include>org.apache.drill.contrib:drill-format-esri:jar</include>
        <include>org.apache.drill.contrib:drill-format-ltsv:jar</include>
        <include>org.apache.drill.contrib:drill-format-excel:jar</include>
        <include>org.apache.drill.contrib:drill-jdbc-storage:jar</include>
        <include>org.apache.drill.contrib:drill-kudu-storage:jar</include>
        <include>org.apache.drill.contrib:drill-storage-kafka:jar</include>
        <include>org.apache.drill.contrib:drill-opentsdb-storage:jar</include>
        <include>org.apache.drill.contrib:drill-udfs:jar</include>
      </includes>
      <outputDirectory>jars</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>

    <dependencySet>
      <!-- Drill-on-YARN goes into its own directory so it does not end up
           on the Drillbit class path. Define the jars/tools folder as any jar
           we ship that is not used by drillbits. -->
      <includes>
        <include>org.apache.drill:drill-yarn:jar</include>
      </includes>
      <outputDirectory>jars/tools</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>

    <dependencySet>
      <includes>
        <include>org.apache.drill.exec:drill-jdbc-all:jar</include>
      </includes>
      <outputDirectory>jars/jdbc-driver</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>

    <dependencySet>
      <outputDirectory>jars</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>org.apache.drill:drill-shaded-guava:jar</include>
      </includes>
    </dependencySet>

    <dependencySet>
      <outputDirectory>jars/classb</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>org.glassfish.jersey.containers</include>
        <include>org.glassfish.jersey.core</include>
        <include>org.reflections</include>
        <include>org.glassfish.hk2.external</include>
        <include>org.mortbay.jetty</include>
        <include>javax.activation</include>
        <include>javax.annotation</include>
        <include>org.glassfish.jersey.containers</include>
        <include>org.glassfish.jersey.core</include>
        <include>org.glassfish.jersey.ext</include>
        <include>org.glassfish.jersey.media</include>
        <include>org.glassfish.jersey.bundles.repackaged</include>
        <include>org.glassfish.hk2</include>
        <include>javax.servlet</include>
        <include>javax.ws.rs</include>
        <include>org.jvnet.mimepull</include>
        <include>com.sun.codemodel</include>
        <include>javax.xml.bind</include>
        <include>ch.qos.logback</include>
        <include>ch.qos.logback</include>
      </includes>
      <scope>test</scope>
    </dependencySet>
    <dependencySet>
      <outputDirectory>jars/3rdparty/</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <excludes>
        <exclude>org.apache.zookeeper</exclude>
        <exclude>org.apache.drill</exclude>
        <exclude>org.apache.drill.exec</exclude>
        <exclude>org.apache.drill.contrib</exclude>
        <exclude>org.apache.drill.contrib.data</exclude>
        <exclude>org.apache.drill.contrib.storage-hive</exclude>
        <exclude>org.apache.drill.memory</exclude>
        <exclude>org.apache.drill.metastore</exclude>
        <!-- Below Hive jars are already included in drill-hive-exec-shaded.jar -->
        <exclude>junit:junit:jar</exclude>
        <!-- exclude or sqlline has problems -->
        <exclude>org.glassfish.jersey.containers</exclude>
        <exclude>org.glassfish.jersey.core</exclude>
        <exclude>org.reflections</exclude>
        <exclude>org.glassfish.hk2.external</exclude>
        <exclude>org.mortbay.jetty</exclude>
        <exclude>javax.activation</exclude>
        <exclude>javax.annotation</exclude>
        <exclude>org.glassfish.jersey.containers</exclude>
        <exclude>org.glassfish.jersey.core</exclude>
        <exclude>org.glassfish.jersey.ext</exclude>
        <exclude>org.glassfish.jersey.media</exclude>
        <exclude>org.glassfish.jersey.bundles.repackaged</exclude>
        <exclude>org.glassfish.hk2</exclude>
        <exclude>javax.servlet</exclude>
        <exclude>javax.ws.rs </exclude>
        <exclude>org.jvnet.mimepull</exclude>
        <exclude>com.sun.codemodel</exclude>
        <exclude>javax.xml.bind</exclude>
        <exclude>ch.qos.logback </exclude>
        <exclude>ch.qos.logback</exclude>
        <exclude>io.netty:netty-tcnative</exclude>
      </excludes>
      <scope>test</scope>
    </dependencySet>
    <dependencySet>
      <outputDirectory>jars/ext</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>org.apache.zookeeper:zookeeper</include>
      </includes>
      <scope>runtime</scope>
    </dependencySet>
    <dependencySet>
      <outputDirectory>jars/3rdparty/linux</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>io.netty:netty-tcnative:jar:linux-x86_64:2.0.1.Final</include>
      </includes>
      <scope>test</scope>
    </dependencySet>
    <dependencySet>
      <outputDirectory>jars/3rdparty/fedora</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>io.netty:netty-tcnative:jar:linux-x86_64-fedora:2.0.1.Final</include>
      </includes>
      <scope>test</scope>
    </dependencySet>
    <dependencySet>
      <outputDirectory>jars/3rdparty/windows</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>io.netty:netty-tcnative:jar:windows-x86_64:2.0.1.Final</include>
      </includes>
      <scope>test</scope>
    </dependencySet>
    <dependencySet>
      <outputDirectory>jars/3rdparty/osx</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>false</useProjectArtifact>
      <includes>
        <include>io.netty:netty-tcnative:jar:osx-x86_64:2.0.1.Final</include>
      </includes>
      <scope>test</scope>
    </dependencySet>
  </dependencySets>

  <fileSets>
    <fileSet>
      <directory>../sample-data</directory>
      <outputDirectory>sample-data</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${project.build.directory}/winutils</directory>
      <outputDirectory>winutils/bin</outputDirectory>
    </fileSet>
  </fileSets>

  <files>
    <file>
      <source>../KEYS</source>
      <outputDirectory />
    </file>
    <file>
      <source>src/main/resources/LICENSE</source>
      <outputDirectory />
    </file>
    <file>
      <source>src/main/resources/README.md</source>
      <outputDirectory />
    </file>
    <file>
      <source>../NOTICE</source>
      <outputDirectory />
    </file>
    <file>
      <source>../git.properties</source>
      <outputDirectory />
    </file>
    <file>
      <source>src/main/resources/runbit</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/hadoop-excludes.txt</source>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drillbit.sh</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-conf</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-embedded</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-embedded.bat</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-localhost</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-config.sh</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/sqlline</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/sqlline.bat</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-on-yarn.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-am.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/yarn-drillbit.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/submit_plan</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-override.conf</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/logback.xml</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/yarn-client-log.xml</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/drill-am-log.xml</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/drill-env.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>conf</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/distrib-env.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>conf</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/auto-setup.sh</source>
      <fileMode>0755</fileMode>
      <outputDirectory>bin</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-setup.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>conf</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/distrib-setup.sh</source>
      <fileMode>0750</fileMode>
      <outputDirectory>conf</outputDirectory>
    </file>
    <file>
      <source>src/main/resources/drill-override-example.conf</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/core-site-example.xml</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/saffron.properties</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/drill-on-yarn-example.conf</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/storage-plugins-override-example.conf</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
    <file>
      <source>src/main/resources/drill-sqlline-override-example.conf</source>
      <outputDirectory>conf</outputDirectory>
      <fileMode>0640</fileMode>
    </file>
  </files>

</component>
