<project name="browser" default="jslint">
    <description>
        The browser project.
    </description>
    
    <target name="jslint" description="Process all JavaScript files in JSLint">
        <apply executable="java" parallel="false" failonerror="false">
            <arg value="-jar"/>
            <arg file="/usr/share/java/js.jar"/>
            <arg file="jslint.js"/>
            <fileset dir="app">
                <include name="**/*.js"/>
            </fileset>
        </apply>
    </target>
    
    <!-- apply doesn't print out the filename, this is another approach -->
    <target name="jslint-new" description="New JSLint task">
        <for param="file">
            <path>
                <fileset dir="app">
                    <include name="**/*.js"/>
                </fileset>
            </path>
            <sequential>
                <java>
                    <arg value="-jar"/>
                    <arg file="/usr/share/java/js.jar"/>
                    <arg file="jslint.js"/>
                    <arg file="@{file}"/>
                </java>
            </sequential>
        </for>
    </target>
    
</project>
