summaryrefslogtreecommitdiffstats
blob: fe96a7414ffbca1804f5ec0c96c7ecc17b811e37 (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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="org.eclipse.persistence.example.jpa.cache">
    <property environment="env"/>
    <!--property name="JDBC_LIB" value="./mysql-connector-java-5.0.7-bin.jar"/-->
    <property name="JDBC_LIB" value="./ojdbc6.jar"/>
    <property name="JPA_LIB" value="./persistence.jar"/>
    <property name="ECLIPSELINK_LIB" value="./eclipselink.jar"/>
    <property name="AGENT" value="-javaagent:${ECLIPSELINK_LIB}"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <path id="base.classpath">
        <pathelement location="classes"/>
        <pathelement location="${JDBC_LIB}"/>
        <pathelement location="${JPA_LIB}"/>
    </path>
    <path id="eclipselink.classpath">
        <pathelement location="classes"/>
        <pathelement location="${JDBC_LIB}"/>
        <pathelement location="${JPA_LIB}"/>
        <pathelement location="${ECLIPSELINK_LIB}"/>
    </path>
    <target name="init" depends="clean">
        <mkdir dir="classes"/>
    </target>
    <target name="clean">
        <delete dir="classes"/>
    </target>

    <target depends="init" name="build">
        <echo message="${ant.project.name}: ${ant.file}"/>
        <javac debug="true" debuglevel="${debuglevel}" destdir="classes">
            <src path="src"/>
            <exclude name="**/.svn/**"/>
            <classpath refid="base.classpath"/>
        </javac>
        <copy todir="classes/META-INF">
			<fileset dir="src/META-INF">
				<include name="*.xml"/>
			</fileset>
		</copy>
    </target>

    <target name="find-test" depends="build">
        <java classname="example.FindTest"
                maxmemory="512m"
                fork="true">
            <jvmarg value="${AGENT}"/>
            <classpath refid="eclipselink.classpath"/>
        </java>
    </target>

    <target name="query-test" depends="build">
        <java classname="example.QueryTest"
                maxmemory="512m"
                fork="true">
            <jvmarg value="${AGENT}"/>
            <classpath refid="eclipselink.classpath"/>
        </java>
    </target>
    
</project>