<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">

    <id>linux</id>
    <formats>
        <format>dir</format>
        <format>tar.gz</format>
    </formats>
    <baseDirectory>Protege-${project.version}</baseDirectory>


    <componentDescriptors>
        <componentDescriptor>src/main/assembly/file-sets.xml</componentDescriptor>
        <componentDescriptor>src/main/assembly/dependency-sets.xml</componentDescriptor>
    </componentDescriptors>

    <fileSets>

        <fileSet>
            <directory>src/main/env/linux</directory>
            <outputDirectory>.</outputDirectory>
            <fileMode>0755</fileMode>
            <directoryMode>0755</directoryMode>
            <excludes>
                <exclude>run.sh</exclude>
            </excludes>
        </fileSet>

    </fileSets>

    <files>
        <file>
            <source>src/main/env/linux/run.sh</source>
            <outputDirectory>.</outputDirectory>
            <fileMode>0755</fileMode>
            <filtered>true</filtered>
        </file>
    </files>

    <dependencySets>

        <dependencySet>
            <outputDirectory>.</outputDirectory>
            <includes>
                <include>edu.stanford.protege:jre.linux:jar</include>
            </includes>
            <unpack>true</unpack>
            <unpackOptions>
                <excludes>
                    <exclude>META-INF</exclude>
                    <exclude>META-INF/**/*</exclude>
                </excludes>
            </unpackOptions>
            <!--
                This is unsatisfactory as it applies to everything.  However, I'm not sure
                how to do this otherwise. (Note, listing the artifact twice with different
                includes and excludes doesn't help as it gets skipped the second time.
            -->
            <fileMode>0755</fileMode>
            <directoryMode>0755</directoryMode>
            <useStrictFiltering>true</useStrictFiltering>
        </dependencySet>

    </dependencySets>


</assembly>
