<assembly
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>assembly</id>
    <formats>
        <format>zip</format>
        <format>tar.gz</format>
    </formats>

    <dependencySets>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>lib</outputDirectory>
            <scope>runtime</scope>

            <excludes>
                <exclude>org.jgrapht:jgrapht-ext:*:combined</exclude>
            </excludes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>lib</outputDirectory>
            <scope>runtime</scope>

            <outputFileNameMapping>jgrapht-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>

            <includes>
                <include>org.jgrapht:jgrapht-ext:*:combined</include>
            </includes>
        </dependencySet>
    </dependencySets>

    <files>
        <file>
            <source>${main.basedir}/README.md</source>
        </file>
        <file>
            <source>${main.basedir}/HISTORY.md</source>
        </file>
        <file>
            <source>${main.basedir}/CONTRIBUTORS.md</source>
        </file>
        <file>
            <source>${main.basedir}/license-LGPL.txt</source>
        </file>
        <file>
            <source>${main.basedir}/license-EPL.txt</source>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/antlr-license.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>commons-lang3-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>commons-math3-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>commons-text-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>dsiutils-license.txt</destName>
        </file>                
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>fastutil-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>guava-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/jgraphx-license.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>jheaps-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/license-EPL.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>jsap-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/license-EPL.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>logback-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/mit-license.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>slf4j-api-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>sux4j-license.txt</destName>
        </file>
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>webgraph-license.txt</destName>
        </file>        
        <file>
            <source>${main.basedir}/etc/licenses/apache-license-2.0.txt</source>
            <outputDirectory>3rd-party-licenses</outputDirectory>
            <destName>webgraph-big-license.txt</destName>
        </file>        
    </files>

    <fileSets>
        <fileSet>
            <directory>${main.basedir}</directory>
            <outputDirectory>source</outputDirectory>
            <excludes>
                <exclude>**/target/**</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>${main.basedir}/target/site/apidocs</directory>
            <outputDirectory>javadoc</outputDirectory>
            <includes>
                <include>**/*</include>
            </includes>
        </fileSet>
    </fileSets>
</assembly>
