<!--
  ~ 
  -->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
    <id>bin</id>
    <formats>
        <format>dir</format>
        <format>tar.gz</format>
    </formats>
    <includeBaseDirectory>true</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>${project.basedir}/src/main/bin</directory>
            <outputDirectory>bin/</outputDirectory>
            <includes>
                <include>*.sh</include>
            </includes>
            <fileMode>0755</fileMode>
            <directoryMode>0755</directoryMode>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/src/main/bin</directory>
            <outputDirectory>bin/</outputDirectory>
            <includes>
                <include>*</include>
            </includes>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/src/main/conf</directory>
            <outputDirectory>conf/</outputDirectory>
            <includes>
                <include>*</include>
            </includes>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/src/main/doc</directory>
            <outputDirectory>doc/</outputDirectory>
            <includes>
                <include>*</include>
            </includes>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/src/main</directory>
            <outputDirectory>.</outputDirectory>
            <includes>
                <include>README.md</include>
            </includes>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>${project.basedir}/src/main/lib</directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>*.sh</include>
            </includes>
            <fileMode>0755</fileMode>
            <lineEnding>unix</lineEnding>
        </fileSet>

        <fileSet>
            <directory>${project.basedir}/../eagle-topology-assembly/target</directory>
            <outputDirectory>lib/</outputDirectory>
            <includes>
                <include>eagle-topology-*-assembly.jar</include>
            </includes>
        </fileSet>

        <!-- copy dependent jars into /lib -->
        <fileSet>
            <directory>${project.build.directory}/dependencies</directory>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>dropwizard-*.jar</include>
                <include>storm-core-*.jar</include>
                <include>slf4j-api-*.jar</include>
                <include>jersey-*.jar</include>
                <include>eagle-storage-hbase-*.jar</include>
                <include>eagle-storage-jdbc-*.jar</include>
            </includes>
        </fileSet>

        <!-- copy collector scripts into /lib/scripts -->
        <fileSet>
            <directory>${project.basedir}/../eagle-external/hadoop_jmx_collector</directory>
            <outputDirectory>lib/scripts/hadoop_jmx_collector</outputDirectory>
        </fileSet>
    </fileSets>
</assembly>