forked from groves/clamp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
62 lines (57 loc) · 2.47 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
<project name="clamp" default="compile">
<!-- set global properties for this build -->
<property name="src.java" location="src/java"/>
<property name="src.python" location="src/python"/>
<property name="test.java" location="test/java"/>
<property name="test.python" location="test/python"/>
<property name="build.dir" location="build"/>
<property name="extlibs.dir" location="extlibs"/>
<property name="dist.dir" location="dist"/>
<property name="src.build" value="${build.dir}/src-classes"/>
<property name="test.build" value="${build.dir}/test-classes"/>
<property name="src.jar" value="${build.dir}/clamp-dev.jar"/>
<property name="test.jar" value="${build.dir}/clamp-test.jar"/>
<!-- Jython properties -->
<property name="jython.home" location="../jython/trunk"/>
<property name="jython.jar" value="${jython.home}/dist/jython-dev.jar"/>
<property name="jython.script" value="${jython.home}/dist/bin/jython"/>
<path id="main.classpath">
<pathelement path="${extlibs.dir}/asm-3.1.jar"/>
<pathelement path="${jython.jar}"/>
</path>
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${src.build}"/>
<mkdir dir="${test.build}"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src.java}" destdir="${src.build}" debug="on">
<classpath refid="main.classpath"/>
</javac>
<javac srcdir="${test.java}" destdir="${test.build}" debug="on">
<classpath refid="main.classpath"/>
</javac>
<jar destfile="${src.jar}">
<fileset dir="${src.build}"/>
<fileset dir="${src.python}"/>
</jar>
<jar destfile="${test.jar}">
<fileset dir="${test.build}"/>
</jar>
</target>
<target name="test" depends="compile">
<exec executable="${jython.script}">
<env key="CLASSPATH" path="${src.jar}:${test.jar}"/>
<env key="JYTHONPATH" path="${extlibs.dir}/nose-0.10.4.zip"/>
<env key="NOSE_WHERE" value="${src.python}"/>
<arg value="-J-Dpython.cachedir.skip=true"/>
<arg value="-c"/>
<arg value="import nose; nose.main()"/>
</exec>
</target>
<target name="clean" description="clean up" >
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
</project>