/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. <path id="classpath">
  16. <fileset dir="${lib.dir}" includes="**/*.jar"/>
  17. </path>
  18. <target name="copyjars"
  19. description="Copies the App Engine JARs to the WAR.">
  20. <copy
  21. todir="lib"
  22. flatten="true">
  23. <fileset dir="${lib.dir}">
  24. <include name="**/*.jar"/>
  25. </fileset>
  26. </copy>
  27. </target>
  28. <target name="init" depends="copyjars">
  29. <!-- Create the time stamp -->
  30. <tstamp/>
  31. <!-- Create the build directory structure used by compile -->
  32. <mkdir dir="${build}"/>
  33. </target>
  34. <target name="compile" depends="init"
  35. description="compile the source ">
  36. <!-- Compile the java code from ${src} into ${build} -->
  37. <javac srcdir="${src}" destdir="${build}" classpathref="classpath"/>
  38. <javac srcdir="${tst-dir}" destdir="${build}" classpathref="classpath.test"/>
  39. </target>
  40. <target name="dist" description="dist" depends="compile">
  41. <mkdir dir="${dist}/"/>
  42. <path id="application" location="${dist}/nimbits-sdk.jar"/>
  43. <jar jarfile="${dist}/nimbits-sdk.jar" basedir="${build}">
  44. <manifest>
  45. <attribute name="Main-Class" value="com.nimbits.MainClass"/>
  46. </manifest>
  47. <fileset dir="build"/>
  48. <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/commons-logging-1.1.1.jar"/>
  49. <zipfileset src="/mnt/raid/nimbits/lib/google-gson-1.7.1"/>
  50. <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/httpclient-4.1.1.jar"/>
  51. <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/httpcore-4.1.1.jar"/>
  52. <zipfileset src="/mnt/raid/nimbits/lib/httpcomponents-client-4.1.1/lib/httpmime-4.1.1.jar"/>
  53. </jar>
  54. </target>
  55. <target name="clean"
  56. description="clean up">
  57. <delete dir="${build}"/>
  58. <delete dir="${dist}"/>
  59. </target>
  60. <path id="classpath.test">
  61. <path refid="classpath"/>
  62. <pathelement location="${build}"/>
  63. <pathelement location="${junit.home}"/>
  64. <pathelement location="${tst-dir}"/>
  65. <pathelement location="${dist}"/>
  66. </path>
  67. <target name="junit" depends="compile">
  68. <mkdir dir="${report.dir}"/>
  69. <junit printsummary="yes">
  70. <classpath>
  71. <path refid="classpath.test"/>
  72. <!-- <path location="${dist}/nimbits-sdk.jar"/>-->
  73. </classpath>
  74. <batchtest fork="no" todir="${report.dir}">
  75. <formatter type="xml"/>
  76. <fileset dir="${tst-dir}" includes="*Test.java"/>
  77. </batchtest>
  78. </junit>
  79. </target>
  80. <target name="junitreport">
  81. <junitreport todir="${report.dir}">
  82. <fileset dir="${report.dir}" includes="TEST-*.xml"/>
  83. <report todir="${report.dir}"/>
  84. </junitreport>
  85. </target>
  86. </project>