File: build.xml

package info (click to toggle)
avalon-framework 4.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 776 kB
  • sloc: java: 6,175; xml: 181; makefile: 9
file content (70 lines) | stat: -rw-r--r-- 2,228 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
<?xml version="1.0"?>

<project default="jar" basedir="..">

  <property name="build.dir"      location="build"/>
  <property name="test.dir"      location="test"/>
  <property name="doc.dir"        location="doc/api"/>
  <property name="dist.dir"       location="dist"/>
  <property name="api.dir"        location="api/src/java"/>
  <property name="impl.dir"       location="impl/src/java"/>

  <target name="prepare">
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${test.dir}"/>
    <mkdir dir="${doc.dir}"/>
    <mkdir dir="${dist.dir}"/>
  </target>

  <target name="clean">
    <delete failonerror="false" dir="${build.dir}"/>
    <delete failonerror="false" dir="${test.dir}"/>
    <delete failonerror="false" dir="${doc.dir}"/>
    <delete failonerror="false" dir="${dist.dir}"/>
  </target>

  <target name="compile" depends="prepare">
    <javac srcdir="${api.dir}" 
	   destdir="${build.dir}" debug="true" nowarn="true" source="1.7" target="1.7"/>
    <javac srcdir="${impl.dir}" 
	   destdir="${build.dir}" debug="true" nowarn="true" source="1.7" target="1.7"/>
  </target>

  <target name="compile-tests" depends="compile">
    <javac srcdir="api/src/test" 
	   destdir="${test.dir}" debug="true" nowarn="true" classpath="${build.dir}"/>
    <javac srcdir="impl/src/test" 
	   destdir="${test.dir}" debug="true" nowarn="true" classpath="${build.dir}"/>
  </target>

  <target name="jar" depends="compile-tests">
    <jar destfile="${dist.dir}/avalon-framework.jar">
      <fileset dir="${build.dir}"/>
    </jar>   
  </target>

  <target name="doc">
    <javadoc destdir="${doc.dir}" source="1.7">
      <fileset dir="${api.dir}"/>
      <fileset dir="${impl.dir}"/>
    </javadoc>
  </target>

  <target name="test-all" depends="compile-tests">
      <junit printsummary="yes">
      <batchtest>
        <fileset dir="api/src/test">
          <include name="**/*TestCase.java"/>
        </fileset>
        <fileset dir="impl/src/test">
          <include name="**/*TestCase.java"/>
        </fileset>
      </batchtest>      
     <classpath>
        <pathelement location="${dist.dir}/avalon-framework.jar"/>
        <pathelement location="${test.dir}"/>
      </classpath>
    </junit>
  </target>

</project>