forked from ib-controller/ib-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
42 lines (36 loc) · 1.74 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
<project name="IBController" default="dist" basedir=".">
<property environment="env"/>
<fail unless="env.TWS" message="Environment variable 'TWS' not set (set it to the fully-qualified directory name containing the TWS jar files)."/>
<property name="ver" value="3.4.3"/>
<property name="src" location="src"/>
<property name="resources" location="resources"/>
<property name="target" location="target"/>
<property name="dist" location="dist"/>
<path id="external.classpath">
<fileset dir="${env.TWS}" includes="**/*.jar"/>
</path>
<target name="clean" description="clean up">
<delete dir="${target}"/>
<delete dir="${dist}"/>
</target>
<target name="compile" description="compile the source ">
<mkdir dir="${target}/classes"/>
<javac srcdir="${src}" destdir="${target}/classes" source="8" target="8" includeantruntime="false">
<classpath refid="external.classpath"/>
<compilerarg value="-Xlint:all"/>
</javac>
</target>
<target name="jar" depends="compile" description="generate the jar">
<jar jarfile="${resources}/IBController.jar" basedir="${target}/classes"/>
</target>
<target name="dist" depends="jar" description="generate the distribution zip">
<echo file="${resources}/version" append="false" message="${ver}"/>
<copy todir="${target}/IBController" preservelastmodified="true">
<fileset file="LICENSE.txt"/>
<fileset dir="${resources}">
<exclude name="IBControllerService/**"/>
</fileset>
</copy>
<zip destfile="${dist}/IBController-${ver}.zip" basedir="${target}/IBController" includes="**"/>
</target>
</project>