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

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