Source

nb-findbugs-libs-offline / libs.findbugs / build.xml

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="netbeans" name="libs.findbugs">
    <description>Builds, tests, and runs the project org.netbeans.libs.findbugs</description>
    <import file="nbproject/build-impl.xml"/>
    <target name="build-init" depends="harness.build-init,download" />
    <target name="download">
        <property name="imported.basedir" value="${basedir}"/>
            
        <macrodef name="download">
             <attribute name="url"/>
             <attribute name="target"/>
             <sequential>
                 <antcall target="-download" inheritAll="false">
                     <param name="url" value="@{url}" />
                     <param name="target" value="@{target}" />
                     <param name="imported.basedir" value="${imported.basedir}" />
                 </antcall>
             </sequential>
        </macrodef>
        <download url="http://repo1.maven.org/maven2/asm/asm/3.3/asm-3.3.jar" target="release/modules/ext/asm-3.3.jar"/>
        <download url="http://repo1.maven.org/maven2/asm/asm-commons/3.3/asm-commons-3.3.jar" target="release/modules/ext/asm-commons-3.3.jar"/>
        <download url="http://repo1.maven.org/maven2/asm/asm-tree/3.3/asm-tree-3.3.jar" target="release/modules/ext/asm-tree-3.3.jar"/>
        <download url="http://repo1.maven.org/maven2/com/google/code/findbugs/bcel/2.0.0/bcel-2.0.0.jar" target="release/modules/ext/bcel-2.0.0.jar"/>
        <download url="http://repo1.maven.org/maven2/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" target="release/modules/ext/commons-lang-2.4.jar"/>
        <download url="http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" target="release/modules/ext/dom4j-1.6.1.jar"/>
        <download url="http://repo1.maven.org/maven2/com/google/code/findbugs/findbugs/2.0.0/findbugs-2.0.0.jar" target="release/modules/ext/findbugs-2.0.0.jar"/>
        <download url="http://repo1.maven.org/maven2/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar" target="release/modules/ext/jaxen-1.1.1.jar"/>
        <download url="http://repo1.maven.org/maven2/com/google/code/findbugs/jFormatString/2.0.0/jFormatString-2.0.0.jar" target="release/modules/ext/jFormatString-2.0.0.jar"/>
        <download url="http://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar" target="release/modules/ext/jsr305-2.0.0.jar"/>
    </target>

    <target name="-download-check-exists">
        <available property="file.exists" file="${imported.basedir}/lib/${target}"/>
    </target>
    
    <target name="-download" depends="-download-check-exists" unless="file.exists">
        <dirname property="dir" file="${imported.basedir}/${target}" />
        <mkdir dir="${dir}" />
        <get src="${url}" dest="${imported.basedir}/${target}" usetimestamp="true"/>
    </target>
    
    <target name="-prepare-imported-basedir-property">
        <dirname property="imported.basedir" file="${ant.file.download}"/>
    </target>
    <target name="-post-init" depends="-prepare-imported-basedir-property,download"/>

</project>