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.

antlib.xml 2.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?xml version="1.0"?>
  2. <!--
  3. ==============================================================================
  4. Ant build file
  5. Authors:
  6. Peter Donald <peter@apache.org>
  7. Legal:
  8. Copyright (c) 2000 The Apache Software Foundation. All Rights Reserved.
  9. ==============================================================================
  10. -->
  11. <project default="main" basedir=".">
  12. <property name="build.dir" value="build"/>
  13. <property name="build.lib" value="${build.dir}/lib"/>
  14. <property name="src.base" value="src"/>
  15. <property name="java.dir" value="${src.base}/java"/>
  16. <property name="lib.dir" value="lib"/>
  17. <!-- directory where you place generated code -->
  18. <property name="gen.dir" value="${build.dir}/gen"/>
  19. <property name="antlib.name" value="NONAME"/>
  20. <property name="antlib.include" value="org/apache/antlib/${antlib.name}/**"/>
  21. <property name="antlib.descriptor" value="${antlib.name}-ant-descriptor.xml"/>
  22. <property name="antlib.role.descriptor" value="${antlib.name}-ant-roles.xml"/>
  23. <path id="project.class.path">
  24. <pathelement path="${java.class.path}" />
  25. <fileset dir="${lib.dir}">
  26. <include name="*.jar" />
  27. </fileset>
  28. <pathelement path="${build.classes}" />
  29. </path>
  30. <!-- Main target -->
  31. <target name="main" depends="jar" />
  32. <target name="check-uptodate">
  33. <uptodate property="xdoclet.uptodate" targetfile="${gen.dir}/${antlib.descriptor}" >
  34. <srcfiles dir= "${java.dir}" includes="${antlib.include}/*.java"/>
  35. </uptodate>
  36. </target>
  37. <!-- runs xdoclet if need be -->
  38. <target name="xdoclet" depends="check-uptodate" unless="xdoclet.uptodate">
  39. <taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="project.class.path"/>
  40. <xdoclet sourcepath="${java.dir}" destdir="${gen.dir}" classpathref="project.class.path">
  41. <fileset dir="${java.dir}">
  42. <include name="${antlib.include}/*.java" />
  43. </fileset>
  44. <template templateFile="${manifest.dir}/core-ant-descriptor.template"
  45. destinationfile="${antlib.descriptor}"/>
  46. <template templateFile="${manifest.dir}/builtin-ant-roles.template"
  47. destinationfile="${antlib.role.descriptor}"/>
  48. </xdoclet>
  49. </target>
  50. <!-- Creates the jars file -->
  51. <target name="jar" depends="xdoclet">
  52. <jar jarfile="${build.lib}/${antlib.name}.atl" basedir="${build.classes}">
  53. <include name="${antlib.include}" />
  54. <zipfileset dir="${gen.dir}" fullpath="META-INF/ant-descriptor.xml">
  55. <include name="${antlib.descriptor}"/>
  56. </zipfileset>
  57. <zipfileset dir="${gen.dir}" fullpath="META-INF/ant-roles.xml">
  58. <include name="${antlib.role.descriptor}"/>
  59. </zipfileset>
  60. </jar>
  61. </target>
  62. </project>