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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?xml version="1.0"?>
  2. <!--
  3. Copyright 2003-2004 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <project default="compile">
  15. <target name="setup">
  16. <property name="build" value="build"/>
  17. <property name="build.classes" value="${build}/classes"/>
  18. <property name="build.testclasses" value="${build}/test-classes"/>
  19. <property name="build.lib" value="${build}/lib"/>
  20. <property name="jarname" value="${build.lib}/dotnet.jar"/>
  21. <mkdir dir="${build.classes}"/>
  22. <mkdir dir="${build.testclasses}"/>
  23. <mkdir dir="${build.lib}"/>
  24. </target>
  25. <target name="compile" depends="setup">
  26. <javac
  27. srcdir="src/main"
  28. destdir="${build.classes}"
  29. debug="true"
  30. />
  31. </target>
  32. <target name="antlib" depends="compile">
  33. <copy todir="${build.classes}">
  34. <fileset dir="src/main" includes="**/antlib.xml"/>
  35. </copy>
  36. <jar
  37. destfile="${jarname}"
  38. basedir="${build.classes}"
  39. />
  40. </target>
  41. <target name="setup-for-tests" depends="setup">
  42. <ant
  43. antfile="../../../build.xml"
  44. target="test-jar"
  45. inheritall="false"
  46. />
  47. </target>
  48. <target name="compile-tests" depends="setup-for-tests, antlib">
  49. <javac
  50. srcdir="src/testcases"
  51. destdir="${build.testclasses}"
  52. debug="true"
  53. >
  54. <classpath>
  55. <pathelement location="${jarname}"/>
  56. <pathelement location="../../../build/lib/ant-testutil.jar"/>
  57. </classpath>
  58. </javac>
  59. </target>
  60. <target name="test" depends="compile-tests">
  61. <junit
  62. printsummary="false"
  63. haltonfailure="false"
  64. failureproperty="tests.failed"
  65. >
  66. <classpath>
  67. <pathelement location="${jarname}"/>
  68. <pathelement location="../../../build/lib/ant-testutil.jar"/>
  69. <pathelement location="${build.testclasses}"/>
  70. </classpath>
  71. <batchtest>
  72. <fileset dir="src/testcases"/>
  73. </batchtest>
  74. <formatter type="plain" usefile="false"/>
  75. </junit>
  76. <fail if="tests.failed">At least one test has failed.</fail>
  77. </target>
  78. </project>