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.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. <path id="project.class.path">
  23. <pathelement path="${java.class.path}" />
  24. <fileset dir="${lib.dir}">
  25. <include name="*.jar" />
  26. </fileset>
  27. <pathelement path="${build.classes}" />
  28. </path>
  29. <!-- Main target -->
  30. <target name="main" depends="jar" />
  31. <target name="check-uptodate">
  32. <uptodate property="xdoclet.uptodate" targetfile="${gen.dir}/${antlib.descriptor}" >
  33. <srcfiles dir= "${java.dir}" includes="${antlib.include}/*.java"/>
  34. </uptodate>
  35. </target>
  36. <!-- runs xdoclet if need be -->
  37. <target name="xdoclet" depends="check-uptodate" unless="xdoclet.uptodate">
  38. <taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="project.class.path"/>
  39. <xdoclet sourcepath="${java.dir}" destdir="${gen.dir}" classpathref="project.class.path">
  40. <fileset dir="${java.dir}">
  41. <include name="${antlib.include}/*.java" />
  42. </fileset>
  43. <template templateFile="${manifest.dir}/core-ant-descriptor.template"
  44. destinationfile="${antlib.descriptor}"/>
  45. <template templateFile="${manifest.dir}/builtin-ant-roles.template"
  46. destinationfile="${antlib.name}-ant-roles.xml"/>
  47. </xdoclet>
  48. </target>
  49. <!-- Creates the jars file -->
  50. <target name="jar" depends="xdoclet">
  51. <jar jarfile="${build.lib}/${antlib.name}.atl" basedir="${build.classes}">
  52. <include name="${antlib.include}" />
  53. <zipfileset dir="${gen.dir}" fullpath="META-INF/ant-descriptor.xml">
  54. <include name="${antlib.descriptor}"/>
  55. </zipfileset>
  56. </jar>
  57. </target>
  58. </project>