<assembly>
    <id>war-dist</id>

    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>true</includeBaseDirectory>

    <fileSets>
        <fileSet>
            <directory>${project.build.directory}/unpacked/examples</directory>
            <outputDirectory>examples</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/docs</directory>
            <outputDirectory>docs</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/wildfly-${wildfly.version}</directory>
            <outputDirectory>keycloak</outputDirectory>
            <excludes>
                <exclude>**/*.sh</exclude>
                <exclude>welcome-content/*</exclude>
                <exclude>**/modules/system/layers/base/org/picketlink/**</exclude>
                <exclude>**/modules/system/layers/base/org/jboss/as/cli/**</exclude>
                <exclude>**/modules/system/layers/base/org/jboss/aesh/**</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/wildfly-${wildfly.version}</directory>
            <outputDirectory>keycloak</outputDirectory>
            <includes>
                <include>**/*.sh</include>
            </includes>
            <fileMode>0755</fileMode>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/modules</directory>
            <outputDirectory>keycloak/modules/system/layers/base</outputDirectory>
            <includes>
                <include>org/picketlink/**</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF</directory>
            <outputDirectory>keycloak/standalone/configuration</outputDirectory>
            <includes>
                <include>keycloak-server.json</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/themes</directory>
            <outputDirectory>keycloak/standalone/configuration/themes</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}/unpacked/adapter</directory>
            <outputDirectory>keycloak</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>src/main/welcome-content</directory>
            <outputDirectory>keycloak/welcome-content</outputDirectory>
            <includes>
                <include>*.*</include>
            </includes>            
        </fileSet>
    </fileSets>
    <!--
    <dependencySets>
        <dependencySet>
            <unpack>false</unpack>
            <useTransitiveDependencies>false</useTransitiveDependencies>
            <includes>
                <include>org.keycloak:keycloak-wildfly-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-as7-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-eap6-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-tomcat6-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-tomcat7-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-tomcat8-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-jetty81-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-jetty91-adapter-dist:zip</include>
                <include>org.keycloak:keycloak-jetty92-adapter-dist:zip</include>
            </includes>
            <outputDirectory>adapters</outputDirectory>
        </dependencySet>
    </dependencySets>
    -->
</assembly>
