-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.xml
199 lines (133 loc) · 5.07 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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<project name="CvappNMO" default="run" basedir=".">
<description>Cvapp converted for use on NeuroMorpho.Org</description>
<target name="init" description="Initialises project, makes build dir">
<property name="main.jar" value="cvapp.jar"/>
<property name="src.dir" value="src"/>
<property name="test.dir" value="test"/>
<property name="build.dir" value="build"/>
<property name="temp.dir" value="temp/"/>
<property name="main.class" value="cvapp.main"/>
<path id="run.class.path">
<pathelement location="${main.jar}"/>
</path>
<path id="test.class.path">
<path refid="run.class.path"/>
</path>
<echo>This is initialising CvappNMO</echo>
<mkdir dir="${build.dir}"/>
</target>
<target name="compile" depends="init"
description="Compiles the source code">
<echo>Compiling CvappNMO code</echo>
<javac srcdir="${src.dir}"
destdir="${build.dir}"
debug="true"
optimize="${optimize}"
compiler="modern"
source="1.8"
target="1.8"
includeantruntime="false">
<classpath refid="run.class.path"/>
</javac>
</target>
<target name="compiletests" depends="compile"
description="Compiles the test code">
<javac srcdir="${test.dir}"
destdir="${build.dir}"
debug="true"
optimize="${optimize}"
compiler="modern"
source="1.8"
target="1.8"
includeantruntime="false">
<classpath refid="test.class.path"/>
</javac>
</target>
<target name="jar" depends="compile" description="Creates main Jar file">
<jar destfile="${main.jar}">
<fileset dir="${build.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="jartests" depends="compiletests"
description="Creates main Jar file including test classes">
<jar destfile="${main.jar}">
<fileset dir="${build.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar"
description="Runs the main code">
<mkdir dir="${temp.dir}"/>
<java classname="${main.class}" fork="true">
<jvmarg value="-Xmx100M" />
<classpath refid="run.class.path"/>
<arg value="examples/dCH-cobalt.CNG.swc"/>
</java>
</target>
<target name="test" depends="clean, jar"
description="Tests the main code">
<mkdir dir="${temp.dir}"/>
<java classname="${main.class}" fork="true">
<jvmarg value="-Xmx100M" />
<classpath refid="test.class.path"/>
<arg value="examples/dCH-cobalt.CNG.swc"/>
<arg value="-test"/>
</java>
</target>
<target name="testnogui" depends="clean, jar"
description="Tests the main code">
<mkdir dir="${temp.dir}"/>
<java classname="${main.class}" fork="true">
<jvmarg value="-Xmx100M" />
<classpath refid="test.class.path"/>
<arg value="examples/dCH-cobalt.CNG.swc"/>
<arg value="-testnogui"/>
</java>
</target>
<target name="testnml" depends="clean, jar"
description="Tests the main code">
<mkdir dir="${temp.dir}"/>
<java classname="${main.class}" fork="true">
<jvmarg value="-Xmx100M" />
<classpath refid="test.class.path"/>
<!--
<arg value="examples/dCH-cobalt.CNG.swc"/>
<arg value="examples/l22_sphersoma.swc"/>
<arg value="examples/l22_cylsoma.swc"/>
<arg value="examples/l22.swc"/>
<arg value="examples/l22_small.swc"/>
-->
<arg value="-test"/>
</java>
</target>
<target name="testone" depends="clean, jar"
description="Tests the main code">
<mkdir dir="${temp.dir}"/>
<java classname="${main.class}" fork="true">
<jvmarg value="-Xmx100M" />
<classpath refid="test.class.path"/>
<!--<arg value="spherSomaSwc/A9-May23-IR1-6-K.CNG.swc"/>
<arg value="twoCylSwc/A2-June2-IR1-1-A.CNG.swc.swc"/>
<arg value="caseExamples/Case1_new.swc"/>-->
<arg value="originalSwc/17.CNG.swc"/>
<arg value="-testone"/>
</java>
</target>
<target name="clean" description="Removes the built files" depends="init">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
<delete>
<fileset dir="." includes="*.jar"/>
</delete>
</target>
<target name="cleantest" description="Removes the files" depends="clean">
<delete>
<fileset dir="temp" includes="*.*"/>
</delete>
</target>
</project>