-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.xml
More file actions
114 lines (88 loc) · 2.97 KB
/
build.xml
File metadata and controls
114 lines (88 loc) · 2.97 KB
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
105
106
107
108
109
110
111
112
113
114
<project name="oopm" default="start" basedir=".">
<target name="start">
<echo>
Welcome to the OPM project.
Call "ant build.all" to build everything.
Call "ant test.all" to test everything.
</echo>
</target>
<property name="build.dir" location="build" />
<property name="dist.dir" location="dist" />
<property name="src.dir" location="opm/src" />
<property name="target.dir" location="target" />
<property name="lib.dir" location="lib" />
<property name="generateDSLocation" value="opm-py/opm-py/generateDS-1.14c/generateDS.py"/>
<property name="xsdfile" value="opm/src/main/resources/opm.1_01.xsd"/>
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath>
<fileset dir="${lib.dir}" includes="*.jar" />
</classpath>
</taskdef>
<path id="ant.classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<target name="build.all"
description="build everyting">
<antcall target="prep.dir"/>
<antcall target="schema.compile"/>
<antcall target="compile"/>
<antcall target="opm.jar"/>
<antcall target="build.python"/>
</target>
<target name="test.all"
description="test everyting">
<antcall target="test"/>
<antcall target="test.python"/>
</target>
<target name="schema.compile">
<xjc schema="${xsdfile}"
destdir="${target.dir}/generated-sources"
package="org.openprovenance.model"/>
</target>
<target name="compile"
description="compile opm library">
<javac source="1.5"
destdir="${build.dir}">
<src>
<pathelement location="${src.dir}/main/java/org/openprovenance/model/"/>
<pathelement location="${target.dir}/generated-sources/"/>
</src>
<classpath refid="ant.classpath"/>
</javac>
</target>
<target name="opm.jar"
description="Compiles and creates a jar file for opm">
<jar destfile="${dist.dir}/opm.jar"
includes = "org/openprovenance/model/**/*"
basedir="${build.dir}"/>
</target>
<target name="prep.dir"
description="prepare directory for compilation">
<delete dir="${build.dir}"/>
<delete dir="${target.dir}"/>
<delete dir="${dist.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${target.dir}"/>
<mkdir dir="${target.dir}/generated-sources"/>
</target>
<target name="build.python">
<exec executable="python">
<arg value="${generateDSLocation}"/>
<arg value="-o"/>
<arg value="${dist.dir}/opm.py"/>
<arg value="--no-process-includes"/>
<arg value="${xsdfile}"/>
</exec>
</target>
<target name="test">
<echo>
Still to be written
</echo>
</target>
<target name="test.python">
<echo>
Still to be written
</echo>
</target>
</project>