<?xml version="1.0"?>

<project name="webapp" default="test"
        xmlns:maven="antlib:org.apache.maven.artifact.ant">

    <target name="test">
        <maven:pom id="maven.project" file="pom.xml"/>

        <maven:dependencies filesetId="all.dependencies"
                pomrefid="maven.project" verbose="true"/>

        <!--
            This creates an empty fileset since the type filter is applied to
            all dependencies in a trail and each trail starts with the main
            artefact, which is the war in this case. All trails are
            heterogeneous, and any type filter will faili (return nothing).
        -->
        <maven:dependencies filesetId="jar.dependencies" type="jar"
                pomrefid="maven.project" verbose="true"/>

        <!--
            Incidentally, this doesn't work, as the filelist used to create
            the path is empty and ant doesn't seem to allow empty filelists.
            Any use of path constructed in such a way fails with 'No files
            specified for filelist' error.
            Uncomment to see the behaviour. But this is a separate bug...
        -->
        <!--
        <maven:dependencies pathId="jar.dependencies.path" type="jar"
                pomrefid="maven.project"/>
        <pathconvert property="test" refid="jar.dependencies.path"/>
        -->

        <pathconvert property="all.dependencies">
            <path>
                <fileset refid="all.dependencies"/>
            </path>
        </pathconvert>

        <pathconvert property="jar.dependencies">
            <path>
                <fileset refid="jar.dependencies"/>
            </path>
        </pathconvert>

        <echo/>
        <echo message="All dependencies: ${all.dependencies}"/>
        <echo message="Jar dependencies: ${jar.dependencies}"/>
    </target>
    
</project>

<!--
    vim: ts=4 sw=4 expandtab
-->

