build.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <project name="jtidy" default="all">
  2. <property file="src/main/resources/jtidy.properties"/>
  3. <property name="target" value="target"/>
  4. <property name="bin" value="${target}/bin"/>
  5. <property name="jar" value="jtidy-${version}.jar"/>
  6. <property name="src" value="src/main/java"/>
  7. <property name="res" value="src/main/resources"/>
  8. <property name="doc" value="javadoc"/>
  9. <property name="srczip" value="jtidy-${version}-sources.zip"/>
  10. <property name="allzip" value="jtidy-${version}.zip"/>
  11. <target name="clean">
  12. <delete dir="${target}"/>
  13. </target>
  14. <target name="jar" depends="clean">
  15. <mkdir dir="${target}"/>
  16. <mkdir dir="${bin}"/>
  17. <javac srcdir="${src}" destdir="${bin}" source="1.4" target="1.4"/>
  18. <jar destfile="${target}/${jar}">
  19. <manifest>
  20. <attribute name="Main-Class" value="org.w3c.tidy.Tidy"/>
  21. <attribute name="Project-Name" value="JTidy"/>
  22. <attribute name="Build-Version" value="${version}"/>
  23. <attribute name="Build-Date" value="${date}"/>
  24. <attribute name="Built-By" value="${user.name}"/>
  25. </manifest>
  26. <fileset dir="${bin}"/>
  27. <fileset dir="${res}"/>
  28. </jar>
  29. </target>
  30. <target name="javadoc" depends="clean">
  31. <javadoc sourcepath="${src}" destdir="${target}/${doc}" windowtitle=" JTidy ${version} " doctitle="JTidy ${version} API documentation">
  32. <tag name="todo" scope="all" description="To do:"/>
  33. </javadoc>
  34. </target>
  35. <target name="src" depends="clean">
  36. <zip destfile="${target}/${srczip}">
  37. <fileset dir=".">
  38. <include name="${src}/**"/>
  39. <include name="${res}/**"/>
  40. <include name="LICENSE.txt"/>
  41. <include name="build.xml"/>
  42. </fileset>
  43. </zip>
  44. </target>
  45. <target name="all" depends="jar, javadoc, src">
  46. <zip destfile="${target}/${allzip}">
  47. <fileset dir="${target}">
  48. <include name="${jar}"/>
  49. <include name="${doc}/**"/>
  50. <include name="${srczip}"/>
  51. </fileset>
  52. <fileset file="LICENSE.txt"/>
  53. </zip>
  54. </target>
  55. </project>