<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>

    <includeBaseDirectory>true</includeBaseDirectory>
    <baseDirectory>pmd-bin-${project.version}</baseDirectory>

    <fileSets>
        <fileSet>
            <includes>
                <include>bgastviewer.bat</include>
                <include>cpd.bat</include>
                <include>cpdgui.bat</include>
                <include>designer.bat</include>
                <include>pmd.bat</include>
            </includes>
            <directory>src/main/scripts</directory>
            <outputDirectory>bin</outputDirectory>
            <fileMode>0755</fileMode>
            <directoryMode>0755</directoryMode>
            <lineEnding>dos</lineEnding>
        </fileSet>

        <fileSet>
            <includes>
                <include>run.sh</include>
            </includes>
            <directory>src/main/scripts</directory>
            <outputDirectory>bin</outputDirectory>
            <fileMode>0755</fileMode>
            <directoryMode>0755</directoryMode>
            <lineEnding>unix</lineEnding>
        </fileSet>

        <fileSet>
            <includes>
                <include>LICENSE</include>
            </includes>
            <directoryMode>0755</directoryMode>
            <fileMode>0644</fileMode>
        </fileSet>
    </fileSets>

    <dependencySets>
        <dependencySet>
            <scope>runtime</scope>
            <outputDirectory>lib</outputDirectory>
            <directoryMode>0755</directoryMode>
            <fileMode>0644</fileMode>
            <useProjectArtifact>false</useProjectArtifact>
        </dependencySet>
    </dependencySets>
</assembly>
