File: build.xml

package info (click to toggle)
easymock 2.4%2Bds1-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,048 kB
  • sloc: java: 9,222; sh: 64; xml: 56; makefile: 43
file content (70 lines) | stat: -rw-r--r-- 2,222 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<project name="easymock" default="dist" basedir="..">
    <description>
        build file for easymock
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="dist" location="dist"/>
  <property name="build" location="build"/>
  <property name="build.test" location="tests-build"/>
  <property name="javadoc" location="api"/>
  <property name="jarfile" location="${dist}/easymock-2.4.jar"/>

  <target name="init">
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
    <mkdir dir="${build.test}"/>
    <mkdir dir="${javadoc}"/>
    <mkdir dir="${dist}"/>
  </target>

  <target name="compile" depends="init"
        description="compile the source" >
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}"/>
  </target>

  <target name="compile-tests" depends="init,compile"
        description="compile the unit tests" >
    <javac srcdir="tests" destdir="${build.test}" classpath="${build}"/>
  </target>

  <target name="test" depends="init,compile,compile-tests" description="run unit tests">
    <junit printsummary="yes" haltonfailure="yes" haltonerror="yes">
      <classpath>
        <pathelement location="${build}"/>
        <pathelement location="${build.test}"/>
      </classpath>

      <formatter type="plain" usefile="false"/>

      <batchtest>
        <fileset dir="tests">
          <include name="**/*Test*.java"/>
          <exclude name="**/AllTests.java"/>
        </fileset>
      </batchtest>
    </junit>
  </target>

  <target name="javadoc" depends="init" description="generate api docs">
    <javadoc destdir="${javadoc}" source="1.5">
      <fileset dir="${src}" defaultexcludes="yes"/>
    </javadoc>
  </target>

  <target name="jar" depends="compile"
        description="generate the jarfile" >

    <jar jarfile="${jarfile}" basedir="${build}"/>
  </target>

  <target name="clean"
        description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${build.test}"/>
    <delete dir="${javadoc}"/>
    <delete dir="${dist}"/>
  </target>
</project>