-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
156 lines (146 loc) · 7.88 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--$Id: build.xml 14011 2010-10-22 20:06:39Z garakl $-->
<project name="worldwind" default="worldwind.jarfile" basedir=".">
<description>
Build script for the World Wind Java API.
</description>
<!-- Load up World Wind build properties. All properties expected by ANT are defined in build.properties. -->
<property file="build/build.properties"/>
<!-- Load up supporting build files with function-specific targets -->
<!-- master build script with main build targets -->
<import file="build/worldwind.build.xml"/>
<!-- release-related tasks and targets -->
<import file="build/release.xml"/>
<!-- general purpose utility targets (clean, jarsigning, diagnostics, metrics -->
<import file="build/util.xml"/>
<!-- test-related targets -->
<import file="build/test.xml"/>
<!-- targets for preparing the assets for the demo site -->
<import file="build/demosite.xml"/>
<!-- Main build targets - high level targets for building World Wind Java -->
<!-- Invokes all World Wind build targets. -->
<target name="build" depends="compile,
javadocs,
worldwind.jarfile,
basicdemo.jarfile"/>
<!-- Compiles the World Wind library.
We configure the javac task parameters 'source' and 'target' in order to explicity control the Java compiler
version used to build World Wind classes. Without these parameters, the javac task would use the most recent
compiler available on the current machine, and the Java compiler version used to build WorldWind classes would
be unprecitable. For this reason, the Apache ANT manual strongly recommends speicfying the 'source' and
'target' parameters. See the following link for more detail:
http://ant.apache.org/manual/CoreTasks/javac.html
The Java compiler version used by the javac task is defined by the build parameter 'worldwind.jdk.version'.
By default, this parameter is defined in the file 'build/build.properties'.
-->
<target name="compile"
description="Compile the World Wind source">
<mkdir dir="${worldwind.classes.dir}"/>
<javac destdir="${worldwind.classes.dir}"
fork="true"
memoryMaximumSize="512m"
source="${worldwind.jdk.version}"
target="${worldwind.jdk.version}">
<src path="${worldwind.src.dir}"/>
<src path="${worldwind.experimental.src.dir}"/>
<exclude name="${worldwind.src.dir}/worldwinddiagnostics/StressTest*.*"/>
<classpath>
<pathelement location="jogl.jar"/>
<pathelement location="gluegen-rt.jar"/>
<pathelement location="${java.home}/lib/plugin.jar"/>
<pathelement location="gdal.jar"/>
</classpath>
</javac>
</target>
<!-- Builds the World Wind library Jar file. -->
<target name="worldwind.jarfile" depends="compile"
description="Build the World Wind library">
<jar jarfile="${basedir}/${worldwind.jarfile}">
<manifest>
<attribute name="Class-Path" value="jogl.jar gluegen-rt.jar gdal.jar"/>
<attribute name="Main-Class" value="${basicdemo.classname}"/>
</manifest>
<fileset dir="${worldwind.classes.dir}">
<include name="gov/nasa/**/*.class"/>
<include name="org/codehaus/jackson/**/*.class"/>
<exclude name="gov/nasa/worldwind/examples/applet/**/*.class"/>
<exclude name="worldwinddiagnostics/StressTest*.class"/>
<exclude name="gov/nasa/worldwind/applications/**/*.class"/>
<exclude name="gov/nasa/worldwind/util/csw/**/*.class"/>
<type type="file"/>
</fileset>
<!-- Note: SARApp depends on html files in the same directory as it's classes. -->
<fileset dir="${worldwind.src.dir}">
<include name="images/**"/>
<include name="config/**"/>
<include name="gov/nasa/worldwind/applications/sar/**/*.html"/>
<include name="gov/nasa/worldwind/util/**/*.properties"/>
<type type="file"/>
</fileset>
</jar>
</target>
<!-- Builds the World Wind Jar file with GLIDER application classes. -->
<target name="worldwind.jarfile.glider" depends="compile"
description="Build the World Wind library and include the GLIDER classes">
<jar jarfile="${basedir}/${worldwind.jarfile}">
<manifest>
<attribute name="Class-Path" value="jogl.jar gluegen-rt.jar gdal.jar"/>
<attribute name="Main-Class" value="${basicdemo.classname}"/>
</manifest>
<fileset dir="${worldwind.classes.dir}">
<include name="gov/nasa/**/*.class"/>
<include name="org/codehaus/jackson/**/*.class"/>
<exclude name="gov/nasa/worldwind/examples/applet/**/*.class"/>
<exclude name="worldwinddiagnostics/StressTest*.class"/>
<exclude name="gov/nasa/worldwind/applications/sar/**/*.class"/>
<exclude name="gov/nasa/worldwind/applications/gio/**/*.class"/>
<exclude name="gov/nasa/worldwind/applications/glider/GliderTestApp*.class"/>
<exclude name="gov/nasa/worldwind/util/csw/**/*.class"/>
<type type="file"/>
</fileset>
<!-- Note: SARApp depends on html files in the same directory as it's classes. -->
<fileset dir="${worldwind.src.dir}">
<include name="images/**"/>
<include name="config/**"/>
<include name="gov/nasa/worldwind/applications/sar/**/*.html"/>
<include name="gov/nasa/worldwind/util/**/*.properties"/>
<type type="file"/>
</fileset>
</jar>
</target>
<!-- Builds the World Wind Jar file with MySpringfield demo classes. -->
<target name="worldwind.jarfile.springfield" depends="compile"
description="Build the World Wind library and include the MySpringfield classes">
<jar jarfile="${basedir}/${worldwind.jarfile}">
<manifest>
<attribute name="Class-Path" value="jogl.jar gluegen-rt.jar gdal.jar"/>
<attribute name="Main-Class" value="${basicdemo.classname}"/>
</manifest>
<fileset dir="${worldwind.classes.dir}">
<include name="gov/nasa/**/*.class"/>
<include name="org/codehaus/jackson/**/*.class"/>
<include name="springfield/**"/>
<exclude name="gov/nasa/worldwind/examples/applet/**/*.class"/>
<exclude name="worldwinddiagnostics/StressTest*.class"/>
<exclude name="gov/nasa/worldwind/applications/**/*.class"/>
<exclude name="gov/nasa/worldwind/util/csw/**/*.class"/>
<type type="file"/>
</fileset>
<!-- Note: SARApp depends on html files in the same directory as it's classes. -->
<fileset dir="${worldwind.src.dir}">
<include name="images/**"/>
<include name="config/**"/>
<include name="gov/nasa/worldwind/applications/sar/**/*.html"/>
<include name="gov/nasa/worldwind/util/**/*.properties"/>
<include name="gov/nasa/worldwindow/config/**"/>
<include name="gov/nasa/worldwindow/images/**"/>
<include name="springfield/config/**"/>
<include name="springfield/images/**"/>
<type type="file"/>
</fileset>
</jar>
<antcall target="jarsigner">
<param name="jarfile" value="${basedir}/${worldwind.jarfile}"/>
</antcall>
</target>
</project>