-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
157 lines (140 loc) · 5.31 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
<?xml version="1.0" ?>
<project name="NeuralNetwork" default="build">
<property file="build.properties" />
<property name="bin.dir" location="bin" />
<property name="test.bin.dir" location="test-bin" />
<property name="source.dir" location="src" />
<property name="source.test.dir" location="test/src" />
<property name="scripts.dir" location="scripts" />
<property name="dist.dir" location="dist" />
<property name="nn.jar" location="nn.jar" />
<path id="dependencies">
<fileset dir="${jogl.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${activemq.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${piccolo.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${clojure.lib.dir}">
<include name="clojure.jar" />
</fileset>
</path>
<path id="test-dependencies">
<fileset dir="${junit.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${jogl.lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${clojure.lib.dir}">
<include name="clojure.jar" />
</fileset>
<pathelement path="${bin.dir}" />
</path>
<target name="init">
<mkdir dir="${bin.dir}" />
<mkdir dir="${test.bin.dir}" />
</target>
<target name="clean" description="Remove binary files">
<delete file="${nn.jar}" />
<delete dir="${bin.dir}" />
<delete dir="${test.bin.dir}" />
<delete dir="${dist.dir}" />
</target>
<target name="compile" depends="init" description="Compile Clojure source">
<java fork="true" failonerror="true" classname="clojure.lang.Compile">
<jvmarg value="-Djava.library.path=${jogl.lib.dir}" />
<classpath>
<path refid="dependencies" />
<path location="${bin.dir}" />
<path location="${source.dir}" />
</classpath>
<sysproperty key="clojure.compile.path" value="${bin.dir}" />
<arg value="com.jhurt.comm.Comm" />
<arg value="com.jhurt.comm.Master" />
<arg value="com.jhurt.comm.Slave" />
<arg value="com.jhurt.ga.GA" />
<arg value="com.jhurt.image.FFT" />
<arg value="com.jhurt.image.ImageUI" />
<arg value="com.jhurt.image.ImageUtils" />
<arg value="com.jhurt.image.MNIST" />
<arg value="com.jhurt.nn.ActivationFunctions" />
<arg value="com.jhurt.nn.BackPropagation" />
<arg value="com.jhurt.nn.Common" />
<arg value="com.jhurt.nn.Clusterer" />
<arg value="com.jhurt.nn.FirstPrincipalComponent" />
<arg value="com.jhurt.nn.Input" />
<arg value="com.jhurt.nn.PerceptronHaykin" />
<arg value="com.jhurt.nn.PerceptronRojas" />
<arg value="com.jhurt.nn.TestRunner" />
<arg value="com.jhurt.nn.trainer.OCR" />
<arg value="com.jhurt.nn.trainer.SimpleBlackjack" />
<arg value="com.jhurt.nn.trainer.XOR" />
<arg value="com.jhurt.CollectionsUtils" />
<arg value="com.jhurt.FileUtils" />
<arg value="com.jhurt.Graph" />
<arg value="com.jhurt.Math" />
<arg value="com.jhurt.NNGenerator" />
<arg value="com.jhurt.Plot3D" />
<arg value="com.jhurt.Serialization" />
<arg value="com.jhurt.SwingUtils" />
<arg value="com.jhurt.Tester" />
<arg value="com.jhurt.ThreadUtils" />
<arg value="com.jhurt.UI" />
</java>
</target>
<target name="compile-tests" depends="compile" description="Compile automated tests">
<java fork="true" failonerror="true" classname="clojure.lang.Compile">
<jvmarg value="-Djava.library.path=${jogl.lib.dir}" />
<classpath>
<path refid="test-dependencies" />
<path location="${test.bin.dir}" />
<path location="${source.test.dir}" />
<path location="${source.dir}" />
</classpath>
<sysproperty key="clojure.compile.path" value="${test.bin.dir}" />
<arg value="com.jhurt.MathTest" />
<arg value="com.jhurt.ga.GATest" />
<arg value="com.jhurt.nn.BackPropagationTest" />
</java>
</target>
<target name="jar">
<jar jarfile="${nn.jar}">
<fileset dir="${bin.dir}" includes="**/*.class" />
</jar>
</target>
<target name="build" depends="clean, compile, jar" />
<target name="dist" depends="build">
<mkdir dir="${dist.dir}"/>
<copy todir="${dist.dir}">
<fileset dir=".">
<include name="nn.jar"/>
</fileset>
<fileset dir="${scripts.dir}/linux">
<include name="*.sh"/>
</fileset>
<fileset dir="${ocr.train.dir}">
<include name="nn_test_data"/>
<include name="nn_training_data"/>
</fileset>
<fileset dir="${piccolo.lib.dir}" includes="**/*.jar"/>
<fileset dir="${activemq.lib.dir}" includes="**/*.jar"/>
<fileset dir="${clojure.lib.dir}" includes="clojure.jar"/>
</copy>
</target>
<target name="run-tests" depends="compile-tests">
<junit showoutput="yes" printsummary="on" fork="yes" haltonfailure="yes">
<classpath>
<path refid="test-dependencies" />
<pathelement location="${test.bin.dir}" />
</classpath>
<formatter type="plain" />
<test name="com.jhurt.MathTest" />
<test name="com.jhurt.ga.GATest" />
<test name="com.jhurt.nn.BackPropagationTest" />
</junit>
</target>
</project>