<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>
            </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/deployments</directory>
            <outputDirectory>keycloak/standalone/deployments</outputDirectory>
            <excludes>
                <exclude>keycloak-ds.xml</exclude>
            </excludes>
        </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>
            </includes>
            <outputDirectory>adapters</outputDirectory>
        </dependencySet>
    </dependencySets>
    <!--
    <moduleSets>
        <moduleSet>
            <useAllReactorProjects>true</useAllReactorProjects>
            <includes>
                <include>org.keycloak:keycloak-wildfly-adapter-dist</include>
            </includes>
            <binaries>
                <outputDirectory>adapters</outputDirectory>
                <attachmentClassifier>zip</attachmentClassifier>
                <includeDependencies>false</includeDependencies>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>
    </moduleSets>
    -->
</assembly>
