Source code file content

Revision: 76 (of 76)

Now allowing users to select different sort types
» Project Revision History

» Checkout URL

mercurial / build.xml

Size: 5198 bytes, 1 line
<?xml version="1.0" encoding="UTF-8"?>
<project name="Cheqlist" default="default" basedir=".">
    <description>Builds, tests, and runs the project Cheqlist.</description>
    <import file="nbproject/build-impl.xml"/>

    <target name="-pre-init">
        <property name="ignore.failing.tests" value="true" />
    </target>

    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init"
            name="-init-check">
        <fail unless="src.dir">Must set src.dir</fail>
        <fail unless="test.src.dir">Must set test.src.dir</fail>
        <fail unless="build.dir">Must set build.dir</fail>
        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
        <fail unless="build.classes.dir">Must set build.classes.dir</fail>
        <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
        <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
        <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
    </target>

    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
        <mkdir dir="${build.test.classes.dir}"/>
    </target>
    <target name="-pre-compile-test"></target>
    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
        <javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
        <copy todir="${build.test.classes.dir}">
            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
        </copy>
    </target>
    <target name="-post-compile-test"></target>
    <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-do-compile-test">
        <taskdef name="groovyc"
                 classname="org.codehaus.groovy.ant.Groovyc"
                 classpathref="${run.test.classpath}"/>
        <groovyc srcdir="${test.src.dir}" destdir="${build.test.classes.dir}"
                classpath="${run.test.classpath}"/>
    </target>
    <target depends="init" if="have.tests" name="-pre-test-run">
        <mkdir dir="${build.test.results.dir}"/>
    </target>
    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
    </target>
    <target depends="init" if="have.tests" name="test-report"/>
    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>

    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
        <junit showoutput="true" fork="true" dir="${basedir}" forkmode="once"
                failureproperty="tests.failed" errorproperty="tests.failed">
            <batchtest todir="${build.test.results.dir}">
                <fileset dir="${build.test.classes.dir}" includes="**/*Test.class" />
            </batchtest>
            <classpath>
                <path path="${build.test.classes.dir}"/>
                <path path="${run.test.classpath}"/>
                <path path="${groovy.classpath}"/>
            </classpath>
            <syspropertyset>
                <propertyref prefix="test-sys-prop."/>
                <mapper from="test-sys-prop.*" to="*" type="glob"/>
            </syspropertyset>
            <formatter type="brief" usefile="false"/>
            <formatter type="xml"/>
            <jvmarg line="${run.jvmargs}"/>
        </junit>
    </target>

    <target name="package-for-store" depends="jar">
        <property name="store.jar.name" value="Cheqlist0.1"/>
        <property name="store.dir" value="store"/>
        <property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>

        <echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>

        <delete dir="${store.dir}"/>
        <mkdir dir="${store.dir}"/>

        <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
            <zipgroupfileset dir="dist" includes="*.jar"/>
            <zipgroupfileset dir="dist/lib" includes="*.jar"/>

            <manifest>
                <attribute name="Main-Class" value="${main.class}"/>
            </manifest>
        </jar>

        <zip destfile="${store.jar}">
            <zipfileset src="${store.dir}/temp_final.jar"
            excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
        </zip>

        <delete file="${store.dir}/temp_final.jar"/>

        <exec executable="jarsigner">
            <arg line="-keystore" />
            <arg file="${jarsign.keystore}" />
            <arg line="-storepass ${jarsign.storepass}" />
            <arg line="-keypass ${jarsign.keypass}" />
            <arg file="${store.jar}"/>
            <arg line="${jarsign.alias}" />
        </exec>
        <echo>Signed Jar '${store.jar}' created</echo>
    </target>
</project>
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close