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.

build.xml 2.5 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" ?>
  2. <project name="XDoclet" default="gen">
  3. <property name="log4j.jar" location="../../lib/optional/log4j.jar"/>
  4. <property name="xdoclet.jar" location="lib/xdoclet.jar"/>
  5. <property name="src.dir"
  6. location="../../src/main/org/apache/tools/ant/taskdefs"/>
  7. <property name="src.root"
  8. location="../../src/main"/>
  9. <property name="build.dir" location="build"/>
  10. <property name="gen.dir" location="${build.dir}/gen"/>
  11. <property name="template.dir" location="templates"/>
  12. <property name="defaults.properties.template"
  13. location="${template.dir}/defaults_properties.template"/>
  14. <property name="xdoc.template"
  15. location="${template.dir}/task_xdoc.template"/>
  16. <target name="init">
  17. <mkdir dir="${build.dir}" />
  18. <mkdir dir="${gen.dir}" />
  19. <!-- hack, this should be outside a target but ${build.dir} gets stripped ?? -->
  20. <path id="xdoclet.classpath">
  21. <pathelement location="${log4j.jar}"/>
  22. <pathelement location="${xdoclet.jar}"/>
  23. <!-- javadoc is needed -->
  24. <pathelement path="${java.class.path}"/>
  25. <pathelement location="${build.dir}"/>
  26. </path>
  27. </target>
  28. <target name="clean">
  29. <delete dir="${build.dir}"/>
  30. </target>
  31. <target name="compile" depends="init">
  32. <javac srcdir="src" destdir="${build.dir}"
  33. debug="true" classpathref="xdoclet.classpath"/>
  34. </target>
  35. <target name="gen" depends="compile">
  36. <delete dir="${gen.dir}"/>
  37. <taskdef name="document"
  38. classname="xdoclet.doc.DocumentDocletTask"
  39. classpathref="xdoclet.classpath"/>
  40. <document sourcepath="${src.root}"
  41. destdir="${gen.dir}"
  42. classpathref="xdoclet.classpath">
  43. <fileset dir="${src.dir}">
  44. <include name="**/*.java" unless="class.name"/>
  45. <include name="${class.name}.java" if="class.name"/>
  46. </fileset>
  47. <template subTaskClassName="org.apache.tools.ant.xdoclet.AntSubTask"
  48. templateFile="${defaults.properties.template}"
  49. destinationfile="defaults.properties"/>
  50. <!-- <template templateFile="${xdoc.template}"
  51. destinationfile="{0}.xml" extent="concrete-type"/> -->
  52. <template subTaskClassName="org.apache.tools.ant.xdoclet.AntSubTask"
  53. templateFile="${xdoc.template}"
  54. destinationfile="{0}.xml" extent="concrete-type"/>
  55. </document>
  56. </target>
  57. </project>