build.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0"?>
  2. <project name="cdegroot-db" default="jar">
  3. <!-- some properties -->
  4. <property name="src.dir" value="src/db" />
  5. <property name="build.dir" value="build" />
  6. <property name="docs.dir" value="docs" />
  7. <property name="dist.dir" value="dist" />
  8. <property name="lib.dir" value="lib" />
  9. <property name="jarfile" value="${dist.dir}/${ant.project.name}.jar" />
  10. <property name="target.jdk" value="1.3" />
  11. <!-- init -->
  12. <target name="init">
  13. <mkdir dir="${dist.dir}" />
  14. <mkdir dir="${build.dir}" />
  15. <mkdir dir="${docs.dir}" />
  16. </target>
  17. <!-- compile everything -->
  18. <target name="compile" depends="init">
  19. <mkdir dir="${build.dir}" />
  20. <javac srcdir="${src.dir}"
  21. destdir="${build.dir}"
  22. source="${target.jdk}"
  23. target="${target.jdk}"/>
  24. </target>
  25. <!-- build the jar file -->
  26. <target name="jar" depends="compile">
  27. <jar jarfile="${jarfile}" basedir="${build.dir}" />
  28. </target>
  29. <!-- generate javadocs -->
  30. <target name="docs" depends="init">
  31. <javadoc sourcepath="${src.dir}"
  32. packagenames="com.*"
  33. destdir="${docs.dir}"
  34. author="true"
  35. version="true"
  36. use="true"
  37. windowtitle="${ant.project.name} API" />
  38. </target>
  39. <!-- clean up -->
  40. <target name="clean">
  41. <delete dir="${build.dir}" />
  42. <delete dir="${docs.dir}" />
  43. <delete dir="${dist.dir}" />
  44. </target>
  45. <!-- zip the sources -->
  46. <target name="sourcezip">
  47. <zip destfile="${dist.dir}/${ant.project.name}-src.zip">
  48. <zipfileset dir="${src.dir}" />
  49. </zip>
  50. </target>
  51. </project>