forked from AnalyticalGraphicsInc/STKComponentsExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
80 lines (69 loc) · 2.63 KB
/
build.xml
File metadata and controls
80 lines (69 loc) · 2.63 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
<project name="SatelliteTracker" basedir="." default="package">
<property name="jar.name" value="SatelliteTracker.jar" />
<property name="output.dir" value="ant" />
<property name="bin.dir" value="${output.dir}/bin" />
<property name="dist.dir" value="dist" />
<property name="jars.dir" value="../../Jars" />
<target name="clean" description="Clean all generated output.">
<delete dir="${output.dir}" />
<delete dir="${dist.dir}" />
</target>
<target name="prepare">
<mkdir dir="${bin.dir}" />
<mkdir dir="${dist.dir}" />
<path id="project.classpath">
<fileset dir="${jars.dir}">
<include name="agi.foundation.core-*.jar" />
<include name="agi.foundation.models-*.jar" />
<include name="agi.foundation.platforms-*.jar" />
</fileset>
<fileset dir="lib" includes="*.jar" />
</path>
</target>
<target name="compile" depends="prepare" description="Compile source code.">
<fail message="License not present. Copy your STK Components license file, AGI.Foundation.lic, into the src folder.">
<condition>
<not>
<available file="src/AGI.Foundation.lic" />
</not>
</condition>
</fail>
<javac source="1.8" target="1.8" destdir="${bin.dir}" classpathref="project.classpath" includeantruntime="no">
<src path="src" />
<src path="../Common/src/" />
<include name="com/agi/satellitetracker/**" />
<include name="yahoo/maps/**" />
</javac>
</target>
<target name="package" depends="compile" description="Package the application into a jar, and copy all needed resources to the dist directory.">
<!-- Copy library jars to the dist directory -->
<copy todir="${dist.dir}" flatten="true">
<path refid="project.classpath" />
</copy>
<!-- Build the jar file containing the application itself -->
<copy todir="${bin.dir}">
<fileset dir="src" excludes="**/*.java" />
</copy>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="project.classpath" />
<flattenmapper />
</pathconvert>
<jar destfile="${dist.dir}/${jar.name}">
<fileset dir="${bin.dir}" />
<manifest>
<attribute name="Class-Path" value="${manifest.classpath}" />
<attribute name="Main-Class" value="com.agi.satellitetracker.Main" />
</manifest>
</jar>
<!-- Copy other resources to the dist directory -->
<copy todir="${dist.dir}/Data">
<fileset dir="../Common/Data">
<include name="LeapSecond.dat" />
<include name="SatelliteDatabase/stkSatDb*" />
</fileset>
</copy>
</target>
<target name="run" depends="package" description="Build and run the demo application.">
<java fork="true" spawn="true" jar="${dist.dir}/${jar.name}" dir="${dist.dir}" />
</target>
</project>