You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

docs.xml 3.2 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <project name="build-site" default="docs" basedir=".">
  2. <description>
  3. Build documentation - XDocs and Javadoc.
  4. For building XDocs, edit xdocs/**/*.xml first.
  5. If ../jakarta-site2 does not exist, set -Dsite.dir=... for it,
  6. or just use -Dvelocity.dir=.../velocity-4.x if you have downloaded Velocity somewhere.
  7. XXX for no apparent reason, your CWD must be the main Ant source dir, or this will fail:
  8. .../docs.xml:64: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource './site.vsl'
  9. </description>
  10. <!-- Initialization properties -->
  11. <property name="project.name" value="ant"/>
  12. <property name="docs.src" location="xdocs"/>
  13. <property name="docs.dest" location="docs"/>
  14. <property name="project.file" value="stylesheets/project.xml" />
  15. <property name="templ.path" location="xdocs/stylesheets" />
  16. <property name="velocity.props" location="${docs.src}/velocity.properties" />
  17. <property name="include.xml" value="**/*.xml" />
  18. <target name="setup-explicit-classpath" if="velocity.dir">
  19. <path id="anakia.classpath">
  20. <fileset dir="${velocity.dir}">
  21. <include name="velocity-dep-*.jar"/>
  22. <!-- XXX why is this needed separately? -->
  23. <include name="build/lib/jdom-*.jar"/>
  24. </fileset>
  25. </path>
  26. </target>
  27. <target name="setup-implicit-classpath" unless="velocity.dir">
  28. <property name="site.dir" location="../jakarta-site2"/>
  29. <path id="anakia.classpath">
  30. <fileset dir="${site.dir}/lib">
  31. <include name="*.jar"/>
  32. </fileset>
  33. </path>
  34. </target>
  35. <target name="prepare" depends="setup-explicit-classpath,setup-implicit-classpath">
  36. <available classname="org.apache.velocity.anakia.AnakiaTask"
  37. property="AnakiaTask.present">
  38. <classpath refid="anakia.classpath"/>
  39. </available>
  40. </target>
  41. <target depends="prepare" name="prepare-error" unless="AnakiaTask.present">
  42. <echo>
  43. AnakiaTask is not present! Please check to make sure that
  44. velocity.jar is in your classpath.
  45. </echo>
  46. </target>
  47. <target name="docs" if="AnakiaTask.present" depends="prepare-error" description="Create XDocs.">
  48. <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
  49. <classpath refid="anakia.classpath"/>
  50. </taskdef>
  51. <anakia basedir="${docs.src}" destdir="${docs.dest}/"
  52. extension=".html" style="./site.vsl"
  53. projectFile="${project.file}"
  54. excludes="**/stylesheets/**"
  55. includes="${include.xml}"
  56. lastModifiedCheck="true"
  57. templatePath="${templ.path}"
  58. velocityPropertiesFile="${velocity.props}">
  59. </anakia>
  60. </target>
  61. <target name="javadocs" description="Create Javadoc.">
  62. <ant antfile="build.xml" target="dist_javadocs">
  63. <property name="dist.javadocs" value="${docs.dest}/manual/api" />
  64. </ant>
  65. </target>
  66. <target name="all" depends="docs,javadocs" description="Create both XDocs and Javadoc."/>
  67. </project>