PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/v3.2/nimbits-sdk/build.xml

http://nimbits-server.googlecode.com/
XML | 106 lines | 81 code | 20 blank | 5 comment | 0 complexity | c60b98c283ecb9a81232910624654368 MD5 | raw file
  1<project name="MyProject" default="dist" basedir=".">
  2    <description>
  3        simple example build file
  4    </description>
  5    <!-- set global properties for this build -->
  6    <property name="src" location="src"/>
  7    <property name="build" location="build"/>
  8    <property name="dist" location="dist"/>
  9    <property name="lib.dir" location="/mnt/raid/nimbits/lib"/>
 10    <property name="report.dir" value="/mnt/raid/deploy/com.nimbits/nimbits-sdk/junitreport"/>
 11    <property name="lib.dir" value="lib"/>
 12    <property name="junit.home" location="/mnt/raid/deploy/com.nimbits/nimbits-sdk/junit-4.9b2.jar"/>
 13    <property name="tst-dir" location="test"/>
 14    <property name="TALK" value="true"/>
 15
 16    <path id="classpath">
 17        <fileset dir="${lib.dir}" includes="**/*.jar"/>
 18    </path>
 19
 20    <target name="copyjars"
 21            description="Copies the App Engine JARs to the WAR.">
 22        <copy
 23                todir="lib"
 24                flatten="true">
 25
 26            <fileset dir="${lib.dir}">
 27                <include name="**/*.jar"/>
 28            </fileset>
 29        </copy>
 30    </target>
 31
 32    <target name="init" depends="copyjars">
 33        <!-- Create the time stamp -->
 34        <tstamp/>
 35        <!-- Create the build directory structure used by compile -->
 36        <mkdir dir="${build}"/>
 37    </target>
 38
 39    <target name="compile" depends="init"
 40            description="compile the source ">
 41        <!-- Compile the java code from ${src} into ${build} -->
 42        <javac srcdir="${src}" destdir="${build}" classpathref="classpath"/>
 43        <javac srcdir="${tst-dir}" destdir="${build}" classpathref="classpath.test"/>
 44    </target>
 45
 46    <target name="dist" description="dist" depends="compile">
 47        <mkdir dir="${dist}/"/>
 48        <path id="application" location="${dist}/nimbits-sdk.jar"/>
 49        <jar jarfile="${dist}/nimbits-sdk.jar" basedir="${build}">
 50            <manifest>
 51                <attribute name="Main-Class" value="com.nimbits.MainClass"/>
 52            </manifest>
 53            <fileset dir="build"/>
 54
 55            <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/commons-logging-1.1.1.jar"/>
 56            <zipfileset src="/mnt/raid/nimbits/lib/google-gson-1.7.1"/>
 57            <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/httpclient-4.1.1.jar"/>
 58
 59
 60            <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/httpcore-4.1.1.jar"/>
 61            <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/httpmime-4.1.1.jar"/>
 62
 63        </jar>
 64    </target>
 65    <target name="clean"
 66            description="clean up">
 67        <delete dir="${build}"/>
 68        <delete dir="${dist}"/>
 69    </target>
 70
 71
 72    <path id="classpath.test">
 73        <path refid="classpath"/>
 74        <pathelement location="${build}"/>
 75        <pathelement location="${junit.home}"/>
 76        <pathelement location="${tst-dir}"/>
 77        <pathelement location="${dist}"/>
 78    </path>
 79
 80    <target name="junit" depends="compile">
 81        <mkdir dir="${report.dir}"/>
 82        <junit printsummary="yes">
 83            <classpath>
 84                <path refid="classpath.test"/>
 85                <!--  <path  location="${dist}/nimbits-sdk.jar"/>-->
 86            </classpath>
 87
 88            <batchtest fork="no" todir="${report.dir}">
 89                <formatter type="xml"/>
 90                <fileset dir="${tst-dir}" includes="*Test.java"/>
 91            </batchtest>
 92        </junit>
 93    </target>
 94
 95
 96    <target name="junitreport">
 97        <junitreport todir="${report.dir}">
 98            <fileset dir="${report.dir}" includes="TEST-*.xml"/>
 99            <report todir="${report.dir}"/>
100        </junitreport>
101    </target>
102
103</project>
104
105
106