-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.xml
103 lines (84 loc) · 3.94 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
<?xml version="1.0"?>
<!--
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!--
*************************************************************************
* Ant script for building and testing F1X FIX Engine
*
* run with -projecthelp option to obtain list of supported tasks
*************************************************************************
-->
<project name="f1x" default="build" basedir=".">
<description>F1X Engine</description>
<!-- set global properties for this script -->
<property file="user.properties"/>
<property file="build.properties"/>
<property environment="env"/>
<!-- Sets the basic environment -->
<property name="lib" location="lib"/>
<property name="tools" location="tools"/>
<property name="source" location="src/main/java"/>
<property name="classesdir" location="target/classes"/>
<property name="testsource" location="src/test/java"/>
<property name="testclassesdir" location="target/test-classes"/>
<target name="build" depends="init,compile,jar" description="Full build"/>
<target name="init">
<echo message="Output: ${classesdir}"/>
<echo message="java.home: ${java.home}"/>
<mkdir dir="${classesdir}"/>
<mkdir dir="${testclassesdir}"/>
</target> <!-- init -->
<target name="clean" depends="init" description="Clean up all output">
<!-- delete compiled classes -->
<delete failonerror="no">
<fileset dir="${classesdir}" includes="**/*.class"/>
<fileset dir="${testclassesdir}" includes="**/*.class"/>
<!--fileset dir="${docsdir}/apidoc"/-->
</delete>
</target> <!-- clean -->
<target name="compile" depends="init" description="Compiles sources">
<echo>Compiling all Java files from ${source} into ${classesdir}</echo>
<javac srcdir="${source}" destdir="${classesdir}" verbose="${verbose}" deprecation="true" debug="${debug.mode}" includeantruntime="false" failonerror="true">
<classpath>
<pathelement location="${lib}/disruptor-3.2.0.jar"/>
<pathelement location="${lib}/gflogger.jar"/>
</classpath>
</javac>
<javac srcdir="${testsource}" destdir="${testclassesdir}" verbose="${verbose}" deprecation="true" debug="${debug.mode}" includeantruntime="false" failonerror="true">
<classpath>
<pathelement location="${classesdir}"/>
<pathelement location="${lib}/disruptor-3.2.0.jar"/>
<pathelement location="${lib}/gflogger.jar"/>
<pathelement location="${tools}/junit-4.11.jar"/>
<pathelement location="${tools}/allocation.jar"/>
<pathelement location="${tools}/mockito-all-1.9.5.jar"/>
<pathelement location="${tools}/quickfix-1.5.3.jar"/>
<pathelement location="${tools}/hamcrest-core-1.3.jar"/>
<pathelement location="${tools}/jmh-core-0.8.jar"/>
</classpath>
</javac>
<copy file="src/main/resources/gflogger.xml" tofile="${classesdir}/gflogger.xml"/>
</target> <!-- compile -->
<target name="jar" depends="compile" description="Generate jar">
<jar destfile="target\f1x-${version}.jar">
<fileset dir="${classesdir}">
<include name="**/*.class"/>
<include name="**/*.xml"/>
</fileset>
</jar>
</target> <!-- jar -->
<target name="deploy" depends="jar" description="Deploy jar">
<copy file="target\f1x-${version}.jar" tofile="${deploy.dir}\f1x.jar"/>
</target> <!-- deploy -->
</project>