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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <project name="embed" default="main" basedir=".">
  2. <property file="${user.home}/build.properties" />
  3. <property name="base.path" location="/usr/share/java"/>
  4. <property name="ant.src" location="../.."/>
  5. <property name="commons.src" location="${ant.src}/../jakarta-commons"/>
  6. <property name="sandbox.src" location="${ant.src}/../jakarta-commons-sandbox"/>
  7. <property name="embed.build" location="build"/>
  8. <property name="debug" value="true"/>
  9. <!-- Those 2 should be moved to JXPath and velocity. -->
  10. <property name="commons-logging.jar" location="${commons.src}/logging/dist/commons-logging.jar" />
  11. <property name="jxpath.jar" location="${commons.src}/jxpath/dist/commons-jxpath.jar" />
  12. <property name="velocity.jar" location="${base.path}/velocity/velocity-20020220.jar" />
  13. <property name="velocity-dep.jar" location="${base.path}/velocity/velocity-dep-20020220.jar" />
  14. <property name="jexl.jar" location="${sandbox.src}/jexl/dist/commons-jexl.jar" />
  15. <property name="commons-discovery.jar" location="${commons.src}/discovery/dist/commons-discovery.jar" />
  16. <target name="build" depends="main" />
  17. <target name="main">
  18. <mkdir dir="build/classes" />
  19. <javac srcdir="src/java"
  20. debug="${debug}"
  21. destdir="${embed.build}/classes" >
  22. <include name="**" />
  23. <exclude name="org/apache/tools/ant/taskdefs/optional/**" />
  24. </javac>
  25. <copy toDir="${embed.build}/classes">
  26. <fileset dir="src/java" includes="META-INF/**" />
  27. </copy>
  28. <jar file="${embed.build}/ant-sax2.jar" basedir="${embed.build}/classes"
  29. manifest="src/java/META-INF/MANIFEST" >
  30. <include name="**" />
  31. </jar>
  32. <echo message="${embed.build}/ant-sax2.jar toDir=${ant.home}/lib"/>
  33. <copy file="${embed.build}/ant-sax2.jar" toDir="${ant.home}/lib"/>
  34. <copy file="${commons-logging.jar}" toDir="${ant.home}/lib"/>
  35. <copy file="${commons-discovery.jar}" toDir="${ant.home}/lib"/>
  36. <copy file="${commons-logging.jar}" toDir="${embed.build}"/>
  37. <copy file="${commons-discovery.jar}" toDir="${embed.build}"/>
  38. </target>
  39. <target name="embed-optional">
  40. <mkdir dir="build/classes" />
  41. <javac srcdir="src/java"
  42. debug="${debug}"
  43. destdir="${embed.build}/classes" >
  44. <include name="org/apache/tools/ant/taskdefs/optional/**" />
  45. <classpath>
  46. <!-- all this will move to their package -->
  47. <pathelement location="build/classes" />
  48. <pathelement location="${jxpath.jar}" />
  49. <pathelement location="${velocity.jar}" />
  50. <pathelement location="${jexl.jar}" />
  51. <pathelement location="${commons-discovery.jar}" />
  52. </classpath>
  53. </javac>
  54. <copy toDir="${embed.build}/classes">
  55. <fileset dir="src/java" includes="META-INF/**" />
  56. </copy>
  57. <jar file="${embed.build}/optional-dynprop.jar" basedir="${embed.build}/classes"
  58. manifest="src/java/META-INF/MANIFEST" >
  59. <include name="org/apache/tools/ant/taskdefs/optional/**" />
  60. </jar>
  61. <echo message="${embed.build}/ant-sax2.jar toDir=${ant.home}/lib"/>
  62. <copy file="${embed.build}/ant-sax2.jar" toDir="${ant.home}/lib"/>
  63. <copy file="${commons-logging.jar}" toDir="${ant.home}/lib"/>
  64. <copy file="${commons-discovery.jar}" toDir="${ant.home}/lib"/>
  65. <copy file="${commons-logging.jar}" toDir="${embed.build}"/>
  66. <copy file="${commons-discovery.jar}" toDir="${embed.build}"/>
  67. </target>
  68. <target name="gump" description="Patch gump bootstrap ant" depends="main" >
  69. <!-- What we'll do - in order to get around gump classpath use - is
  70. to recreate ant.jar ( using build/classes ) to include our code -->
  71. <unjar jar="${ant.src}/bootstrap/lib/ant.jar" dest="${embed.build}/classes" />
  72. <delete file="${ant.src}/bootstrap/lib/ant.jar" />
  73. <jar file="${ant.src}/bootstrap/lib/ant.jar" basedir="${embed.build}/classes"
  74. manifest="${embed.build}/classes/META-INF/MANIFEST" includes="**" />
  75. </target>
  76. </project>