summaryrefslogtreecommitdiffstats
path: root/java-hibernate/build.xml
blob: 2a78bef93a42875d4d5de6c6c5e33b7a4cc11350 (plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<project default="all">
    <property name="JAVA_LIB_HOME"  location="lib" />
    <property name="HIBERNATE_DIR"  location="${JAVA_LIB_HOME}/hibernate" />

    <property name="cfg-dir"  location="cfg" />
    <property name="src-dir"  location="src" />
    <property name="obj-dir"  location="classes" />
    <property name="meta-dir"  location="META-INF" />
    <property name="verbose"  value="false" />

    <path id="classpath.base">
        <pathelement location="${obj-dir}" />
        <pathelement location="${JAVA_LIB_HOME}/h2-1.3.161.jar" />
        <!--pathelement location="${JAVA_LIB_HOME}/logback-access-1.0.0.jar" /-->
        <pathelement location="${JAVA_LIB_HOME}/logback-classic-1.0.0.jar" />
        <pathelement location="${JAVA_LIB_HOME}/logback-core-1.0.0.jar" />
        <pathelement location="${HIBERNATE_DIR}/hibernate3.jar" />
        <fileset dir="${HIBERNATE_DIR}/lib" includes="**/*.jar" />
    </path>

    <path id="classpath.run">
        <path refid="classpath.base" />
    </path>
    <path id="classpath.test">
        <pathelement location="${cfg-dir}" />
        <pathelement location="${JAVA_LIB_HOME}/junit-4.10.jar" />
        <path refid="classpath.base" />
    </path>
    <path id="classpath.test-basic">
        <path refid="classpath.test" />
        <pathelement location="${cfg-dir}/basic" />
    </path>
    <path id="classpath.test-annotations">
        <path refid="classpath.test" />
        <pathelement location="${cfg-dir}/annotations" />
    </path>
    <path id="classpath.test-jpa">
        <path refid="classpath.test" />
    </path>

    <target name="init">
        <mkdir dir="${obj-dir}" />
    </target>

    <target name="clean-compile">
        <delete verbose="${verbose}" dir="${obj-dir}" />
    </target>

    <target name="resources">
        <copy todir="${obj-dir}/META-INF">
            <fileset dir="${meta-dir}" />
        </copy>
    </target>

    <target name="compile-test" depends="init,resources">
        <javac srcdir="${src-dir}" destdir="${obj-dir}" includeantruntime="false">
            <classpath refid="classpath.test" />
            <compilerarg value="-Xlint"/>
        </javac>
    </target>

    <target name="test-basic" depends="compile-test">
        <junit>
            <classpath refid="classpath.test-basic" />
            <formatter type="brief" usefile="false" />
            <test name="ch.asynk.hibernate.basic.HibernateBasicTest" />
        </junit>
    </target>

    <target name="test-annotations" depends="compile-test">
        <junit>
            <classpath refid="classpath.test-annotations" />
            <formatter type="brief" usefile="false" />
            <test name="ch.asynk.hibernate.annotations.HibernateAnnotationsTest" />
        </junit>
    </target>

    <target name="test-jpa" depends="compile-test">
        <junit>
            <classpath refid="classpath.test-jpa" />
            <formatter type="brief" usefile="false" />
            <test name="ch.asynk.hibernate.jpa.HibernateJPATest" />
        </junit>
    </target>

    <target name="test-all">
        <antcall target="test-basic"/>
        <antcall target="test-annotations"/>
        <antcall target="test-jpa"/>
    </target>

    <target name="dist">
        <jar destfile="distrib.jar"
            basedir="."
            includes="build.xml,src/**,cfg/**"
            excludes=""
            />
    </target>

    <target name="all" depends="test-all" />
    <target name="clean" depends="clean-compile" />
</project>

<!-- $Id: build.xml,v 1.6 2003/07/07 19:29:01 dwight Exp $ -->