Source

jackpot30 / cmdline / compiler / build.xml

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="org.netbeans.modules.jackpot30.compiler" default="netbeans" basedir=".">
    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.compiler.</description>
    <import file="nbproject/build-impl.xml"/>
    <import file="${suite.dir}/../findbugs-import.xml"/>

    <target name="ant" depends="init,jar">
        <mkdir dir="build/antclasses"/>
        <javac srcdir="antsrc" destdir="build/antclasses" source="1.5" target="1.5" debug="true" deprecation="true">
            <classpath>
                <path refid="cp"/>
                <pathelement location="${ant.jar}"/>
                <pathelement location="${tools.jar}"/>
                <pathelement location="${cluster}/modules/${code.name.base.dashes}.jar"/>
            </classpath>
            <compilerarg line="-proc:none" />
        </javac>
        <copy todir="build/antclasses">
            <fileset dir="antsrc" excludes="${jar-excludes}"/>
        </copy>
        <property name="ant.library.target.dir" value="${cluster}/antextra" />
        <mkdir dir="${ant.library.target.dir}"/>
        <jar jarfile="${ant.library.target.dir}/${code.name.base.dashes}.jar" compress="false">
            <fileset dir="build/antclasses"/>
        </jar>
    </target>

    <target name="copy-to-hudson" depends="create-standalone-compiler">
        <mkdir dir="${hudson.compiler.dir}" /> <!--only to be sure, should exist-->
        <copy file="${build.classes.dir}/../jackpotc/ant-jackpotc.jar" todir="${hudson.compiler.dir}"/>
        <copy file="${build.classes.dir}/../jackpotc/jackpotc.jar" todir="${hudson.compiler.dir}"/>
    </target>

    <target name="create-standalone-compiler" depends="init,ant">
        <mkdir dir="${build.classes.dir}/../jackpotc" />
        <copy file="${ant.library.target.dir}/${code.name.base.dashes}.jar" tofile="${build.classes.dir}/../jackpotc/ant-jackpotc.jar"/>
        <copy todir="${build.classes.dir}/../jackpotc">
            <fileset dir="scripts"/>
        </copy>
        <chmod dir="${build.classes.dir}/../jackpotc" perm="ugo+x" includes="jackpotc"/>
        <ant target="test" inheritall="false" inheritrefs="false">
            <property name="test.config.standalone.includes" value="org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJar.class"/>
            <property name="test.config" value="standalone"/>
            <property name="test-unit-sys-prop.outputDir" location="${build.classes.dir}/../jackpotc" />
        </ant>
        <zip destfile="${build.classes.dir}/../jackpotc.zip">
            <zipfileset file="${build.classes.dir}/../jackpotc/jackpotc" filemode="755" fullpath="jackpotc/jackpotc"/>
            <zipfileset dir="${build.classes.dir}/../jackpotc" prefix="jackpotc">
                <exclude name="hints" />
                <exclude name="jackpotc" />
            </zipfileset>
        </zip>
    </target>

    <target name="clean" depends="init,projectized-common.clean">
        <delete file="${hudson.compiler.dir}/ant-jackpotc.jar"/>
        <delete file="${hudson.compiler.dir}/jackpotc.jar"/>
    </target>

    <target name="netbeans-extra" depends="ant"/>
    
    <target name="test-build" depends="projectized-common.test-build,-prepare-scripted-tests" />
    
</project>