<? xml version="1.0"? >

<!--  FIXME It's very confusing why win32 is bundled with an jre, but not linux or mac.  Either all should have an jre
bundled or none -->

<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>mac-bin</id>
    <formats>
        <format>zip</format>
    </formats>
    <dependencySets>
        <dependencySet>
            <outputDirectory>lib</outputDirectory>
            <useProjectArtifact>false</useProjectArtifact>
            <scope>runtime</scope>
            <excludes>
                <exclude>${project.groupId}:${project.src.artifactId}:jar:${project.version}</exclude>
                <exclude>org.openjfx:*:jar:linux:*</exclude>
                <exclude>org.openjfx:*:jar:win:*</exclude>
            </excludes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>bin</outputDirectory>
            <useProjectArtifact>false</useProjectArtifact>
            <useStrictFiltering>true</useStrictFiltering>
            <scope>runtime</scope>
            <includes>
                <include>${project.groupId}:${project.src.artifactId}:jar:${project.version}</include>
            </includes>
            <outputFileNameMapping>${project.src.artifactId}-${project.version}.jar</outputFileNameMapping>
        </dependencySet>
    </dependencySets>
    <fileSets>
        <fileSet>
            <directory>${project.parent.basedir}</directory>
            <outputDirectory>/</outputDirectory>
            <includes>
                <include>*.md</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${basedir}/src/dist</directory>
            <outputDirectory>/</outputDirectory>
            <excludes>
                <exclude>*.url</exclude>
                <exclude>**/bin/*.bat</exclude>
                <exclude>**/bin/*.sh</exclude>
                <exclude>**/bin/*.log</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>${basedir}/target/classes</directory>
            <outputDirectory>bin</outputDirectory>
            <includes>
                <include>SoapUI-Spashscreen.png</include>
                <include>SoapUI-Spashscreen@2x.png</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${basedir}/..</directory>
            <outputDirectory>.</outputDirectory>
            <includes>
                <include>RELEASENOTES.txt</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${basedir}/src/dist/bin</directory>
            <outputDirectory>bin</outputDirectory>
            <includes>
                <include>*.sh</include>
            </includes>
            <fileMode>0755</fileMode>
            <filtered>true</filtered>
        </fileSet>
        <fileSet>
            <directory>${basedir}/src/dist/bin</directory>
            <outputDirectory>bin</outputDirectory>
            <includes>
                <include>*.log</include>
            </includes>
            <lineEnding>unix</lineEnding>
            <fileMode>0666</fileMode>
        </fileSet>
        <fileSet>
            <directory>${maven.wsi.root}</directory>
            <outputDirectory>wsi-test-tools</outputDirectory>
            <excludes>
                <exclude>**/*.bat</exclude>
            </excludes>
        </fileSet>

        <!--  TODO Ugly hack to create the empty listeners and actions directories -->
        <fileSet>
            <!--  This must be a directory without sub directories -->
            <directory>src/dist/bin/ext</directory>
            <outputDirectory>bin/actions</outputDirectory>
            <excludes>
                <exclude>*</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>src/dist/bin/ext</directory>
            <outputDirectory>bin/listeners</outputDirectory>
            <excludes>
                <exclude>*</exclude>
            </excludes>
        </fileSet>
    </fileSets>
</assembly>
