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

    <id>bootstrap</id>

    <formats>
        <format>jar</format>
    </formats>

    <includeBaseDirectory>false</includeBaseDirectory>

    <files>
        <file>
            <destName>libraries.list</destName>
            <outputDirectory>META-INF</outputDirectory>
            <source>${project.build.directory}/dependencies-checksums.sha</source>
        </file>
        <file>
            <destName>versions.list</destName>
            <outputDirectory>META-INF</outputDirectory>
            <source>${project.build.directory}/artifacts-checksums.sha</source>
        </file>
    </files>

    <fileSets>
        <fileSet>
            <directory>${project.basedir}/src/assembly/META-INF</directory>
            <filtered>true</filtered>
            <outputDirectory>META-INF</outputDirectory>
        </fileSet>
    </fileSets>

    <dependencySets>
        <!-- libraries -->
        <dependencySet>
            <excludes>
                <exclude>org.spigotmc:minecraft-server</exclude>
            </excludes>
            <outputDirectory>META-INF/libraries</outputDirectory>
            <useProjectArtifact>false</useProjectArtifact>
        </dependencySet>

        <!-- main jar -->
        <dependencySet>
            <includes>
                <include>${project.groupId}:${project.artifactId}</include>
            </includes>
            <outputDirectory>META-INF/versions</outputDirectory>
        </dependencySet>

        <!-- bootstrap -->
        <dependencySet>
            <includes>
                <include>${project.groupId}:${project.artifactId}</include>
            </includes>
            <unpack>true</unpack>
            <unpackOptions>
                <includes>
                    <include>org/bukkit/craftbukkit/bootstrap/**</include>
                </includes>
            </unpackOptions>
        </dependencySet>
    </dependencySets>
</assembly>
