<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">
    <id>bin</id>
    <formats>
        <format>zip</format>
    </formats>
    <!-- release bin jars -->
    <dependencySets>
        <dependencySet>
            <outputDirectory>lib</outputDirectory>
            <includes>
                <include>org.jboss.byteman:byteman:jar:*</include>
                <include>org.jboss.byteman:byteman-submit:jar:*</include>
                <include>org.jboss.byteman:byteman-install:jar:*</include>
            </includes>
            <excludes>
                <exclude>*:javadoc</exclude>
                <exclude>*:sources</exclude>
            </excludes>
            <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <outputDirectory>sample/lib</outputDirectory>
            <includes>
                <include>org.jboss.byteman:byteman-sample:jar:*</include>
            </includes>
            <excludes>
                <exclude>*:javadoc</exclude>
                <exclude>*:sources</exclude>
            </excludes>
            <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <outputDirectory>contrib/dtest</outputDirectory>
            <includes>
                <include>org.jboss.byteman:byteman-dtest:jar:*</include>
            </includes>
            <excludes>
                <exclude>*:javadoc</exclude>
                <exclude>*:sources</exclude>
            </excludes>
            <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <outputDirectory>contrib/bmunit</outputDirectory>
            <includes>
                <include>org.jboss.byteman:byteman-bmunit:jar:*</include>
            </includes>
            <excludes>
                <exclude>*:javadoc</exclude>
                <exclude>*:sources</exclude>
            </excludes>
            <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <outputDirectory>contrib/bmunit</outputDirectory>
            <includes>
                <include>org.jboss.byteman:byteman-bmunit5:jar:*</include>
            </includes>
            <excludes>
                <exclude>*:javadoc</exclude>
                <exclude>*:sources</exclude>
            </excludes>
            <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <outputDirectory>contrib/jboss-modules-system</outputDirectory>
            <includes>
                <include>org.jboss.byteman:byteman-jboss-modules-plugin:jar:*</include>
            </includes>
            <excludes>
                <exclude>*:javadoc</exclude>
                <exclude>*:sources</exclude>
            </excludes>
            <outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
    </dependencySets>
    <!-- bin sctipts -->
    <fileSets>
        <fileSet>
            <directory>../bin</directory>
            <includes>
                <include>*.bat</include>
            </includes>
            <fileMode>0444</fileMode>
            <lineEnding>dos</lineEnding>
        </fileSet>
        <fileSet>
            <directory>../bin</directory>
            <includes>
                <include>**</include>
            </includes>
	    <excludes>
	      <exclude>*.bat</exclude>
	    </excludes>
            <fileMode>0755</fileMode>
            <lineEnding>unix</lineEnding>
        </fileSet>
    <!-- sample scripts -->
        <fileSet>
            <directory>../sample/</directory>
            <includes>
                <include>scripts/**</include>
            </includes>
            <lineEnding>unix</lineEnding>
        </fileSet>
    </fileSets>
    <files>
        <!-- documentation -->
        <file>
            <source>../contrib/dtest/README.adoc</source>
            <outputDirectory>contrib/dtest</outputDirectory>
            <lineEnding>keep</lineEnding>
        </file>
        <file>
            <source>../contrib/bmunit/README.txt</source>
            <outputDirectory>contrib/bmunit</outputDirectory>
            <lineEnding>keep</lineEnding>
        </file>
        <file>
            <source>../contrib/jboss-modules-system/README.txt</source>
            <outputDirectory>contrib/jboss-modules-system</outputDirectory>
            <lineEnding>keep</lineEnding>
        </file>
        <file>
            <source>../README</source>
            <lineEnding>keep</lineEnding>
        </file>
        <file>
            <source>../docs/copyright.txt</source>
            <outputDirectory>docs</outputDirectory>
            <lineEnding>keep</lineEnding>
        </file>
        <file>
            <source>../docs/asciidoc/target/generated-docs/byteman-programmers-guide.pdf</source>
            <outputDirectory>docs</outputDirectory>
            <lineEnding>keep</lineEnding>
        </file>
        <file>
            <source>../licenses/third_party_licenses.txt</source>
            <outputDirectory>docs</outputDirectory>
            <lineEnding>keep</lineEnding>
        </file>
    </files>
</assembly>
