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 3.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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="build.custom-tasks" value="${build.dir}/tasks"/>
  15. <property name="src.base" value="src"/>
  16. <property name="java.dir" value="${src.base}/java"/>
  17. <property name="lib.dir" value="lib"/>
  18. <!-- directory where you place generated code -->
  19. <property name="gen.dir" value="${build.dir}/gen"/>
  20. <property name="antlib.name" value="NONAME"/>
  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. <pathelement path="${build.custom-tasks}" />
  30. </path>
  31. <!-- Main target -->
  32. <target name="main" depends="antlib-jar" />
  33. <!-- Define the pattern which specifies file to include/exclude
  34. in this antlib. -->
  35. <target name="antlib-definition">
  36. <patternset id="antlib.include">
  37. <include name="org/apache/antlib/${antlib.name}/**"/>
  38. </patternset>
  39. </target>
  40. <!-- runs xdoclet if need be -->
  41. <target name="antlib-docs"
  42. depends="antlib-definition"
  43. description="Generate documentation for antlib">
  44. <antlib-descriptor libName="${antlib.name}"
  45. destdir="${gen.dir}"
  46. classpathref="project.class.path">
  47. <fileset dir="${java.dir}">
  48. <patternset refid="antlib.include"/>
  49. </fileset>
  50. <antdoc docsDestDir="${gen.dir}/docs"/>
  51. </antlib-descriptor>
  52. </target>
  53. <!-- runs xdoclet if need be -->
  54. <target name="antlib-descriptors"
  55. depends="antlib-definition"
  56. unless="antlib-descriptors.omit">
  57. <antlib-descriptor libName="${antlib.name}"
  58. destdir="${gen.dir}"
  59. classpathref="project.class.path">
  60. <fileset dir="${java.dir}">
  61. <patternset refid="antlib.include"/>
  62. </fileset>
  63. <!-- antdoc docsDestDir="${gen.dir}/docs"/-->
  64. </antlib-descriptor>
  65. </target>
  66. <!-- Generate an "atl" jar file for this antlib. -->
  67. <target name="antlib-jar" depends="antlib-descriptors">
  68. <antlib-jar jarfile="${build.lib}/${antlib.name}.atl"
  69. descriptor="${gen.dir}/${antlib.descriptor}"
  70. rolesDescriptor="${gen.dir}/${antlib.role.descriptor}">
  71. <fileset dir="${build.classes}">
  72. <patternset refid="antlib.include"/>
  73. </fileset>
  74. </antlib-jar>
  75. </target>
  76. </project>