-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·67 lines (59 loc) · 2.57 KB
/
build.xml
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
<project name="Neo4J" default="run" basedir=".">
<description>ant build file for running Neo4J graphs</description>
<!-- set global properties for this build -->
<property name="src" value="src"/>
<property name="test.src" value="test"/>
<property name="build" value="target"/>
<property name="classes" value="${build}/classes"/>
<property name="dist" value="${build}/dist"/>
<property name="lib" value="lib"/>
<property name="db.location" value="${db.location}"/>
<path id="compile.classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${classes}"/>
</target>
<target name="compile" depends="clean" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac fork="true" srcdir="${src}" destdir="${classes}" classpathref="compile.classpath"
includeantruntime="false"/>
<javac srcdir="${test.src}" destdir="${classes}" includeantruntime="false">
<classpath>
<pathelement path="${classes}"/>
<path refid="compile.classpath"/>
</classpath>
</javac>
</target>
<target name="run" depends="compile" description="Run the Neo4J Code">
<java fork="true" classname="com.nosql.neo4j.RunGraph">
<classpath refid="compile.classpath"/>
<classpath location="${classes}"/>
<jvmarg value="-Ddb.location=${db.location}"/>
</java>
</target>
<target name="test" depends="compile">
<mkdir dir="${build}/test"/>
<junit fork="true" forkmode="once" maxMemory="32M" showoutput="false" failureproperty="junit.failure"
timeout="1800000">
<formatter extension=".xml" type="plain" usefile="false"/>
<classpath>
<pathelement path="${classes}"/>
<fileset dir="${lib}">
<include name="*.jar"/>
<exclude name="ant.jar"/>
</fileset>
</classpath>
<batchtest fork="yes" todir="${build}/test/junit-results" failureProperty="junit.failure">
<fileset dir="${test.src}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
<fail if="junit.failure" message="one or more unit tests failed"/>
</target>
</project>