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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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="build.classes" value="${build.dir}/classes"/>
  16. <property name="src.base" value="src"/>
  17. <property name="java.dir" value="${src.base}/java"/>
  18. <property name="lib.dir" value="lib"/>
  19. <!-- directory where you place generated code -->
  20. <property name="gen.dir" value="${build.dir}/gen"/>
  21. <property name="antlib.name" value="NONAME"/>
  22. <property name="antlib.descriptor" value="${antlib.name}-ant-descriptor.xml"/>
  23. <property name="antlib.role.descriptor" value="${antlib.name}-ant-roles.xml"/>
  24. <path id="project.class.path">
  25. <pathelement path="${java.class.path}" />
  26. <pathelement location="../../lib/optional/junit.jar" />
  27. <pathelement location="../xdocs/lib/xdoclet.jar" />
  28. <pathelement location="../xdocs/lib/log4j-core.jar" />
  29. <fileset dir="${lib.dir}" includes="**/*.jar"/>
  30. <fileset dir="tools/lib" includes="**/*.jar"/>
  31. <pathelement path="${build.classes}" />
  32. <pathelement path="${build.custom-tasks}" />
  33. </path>
  34. <taskdef name="antlib-jar"
  35. classname="org.apache.myrmidon.build.AntlibJarTask">
  36. <classpath location="${build.custom-tasks}"/>
  37. </taskdef>
  38. <taskdef name="antlib-descriptor"
  39. classname="org.apache.myrmidon.build.AntlibDescriptorTask">
  40. <classpath refid="project.class.path"/>
  41. </taskdef>
  42. <!-- Main target -->
  43. <target name="main" depends="antlib-jar" />
  44. <!-- Define the pattern which specifies file to include/exclude
  45. in this antlib. -->
  46. <target name="antlib-definition">
  47. <patternset id="antlib.include">
  48. <include name="org/apache/antlib/${antlib.name}/**"/>
  49. </patternset>
  50. </target>
  51. <!-- runs xdoclet if need be -->
  52. <target name="antlib-docs"
  53. depends="antlib-definition"
  54. description="Generate documentation for antlib">
  55. <antlib-descriptor libName="${antlib.name}"
  56. destdir="${gen.dir}"
  57. classpathref="project.class.path">
  58. <fileset dir="${java.dir}">
  59. <patternset refid="antlib.include"/>
  60. </fileset>
  61. <antdoc docsDestDir="${gen.dir}/docs"/>
  62. </antlib-descriptor>
  63. </target>
  64. <!-- runs xdoclet if need be -->
  65. <target name="antlib-descriptors"
  66. depends="antlib-definition"
  67. unless="antlib-descriptors.omit">
  68. <antlib-descriptor libName="${antlib.name}"
  69. destdir="${gen.dir}"
  70. classpathref="project.class.path">
  71. <fileset dir="${java.dir}">
  72. <patternset refid="antlib.include"/>
  73. </fileset>
  74. <!-- antdoc docsDestDir="${gen.dir}/docs"/-->
  75. </antlib-descriptor>
  76. <!-- Manifest -->
  77. <copy todir="${gen.dir}">
  78. <fileset dir="src/manifest" includes="${antlib.name}-manifest.mf" />
  79. </copy>
  80. <copy file="src/manifest/empty-manifest.mf" tofile="${gen.dir}/${antlib.name}-manifest.mf"/>
  81. </target>
  82. <!-- Generate an "atl" jar file for this antlib. -->
  83. <target name="antlib-jar" depends="antlib-descriptors">
  84. <antlib-jar jarfile="${build.lib}/${antlib.name}.atl"
  85. manifest="${gen.dir}/${antlib.name}-manifest.mf"
  86. descriptor="${gen.dir}/${antlib.descriptor}"
  87. rolesDescriptor="${gen.dir}/${antlib.role.descriptor}">
  88. <fileset dir="${build.classes}">
  89. <patternset refid="antlib.include"/>
  90. </fileset>
  91. </antlib-jar>
  92. </target>
  93. </project>