forked from OpenSextant/opensextant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
165 lines (126 loc) · 5.92 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
158
159
160
161
162
163
164
165
<project name="OpenSextant" basedir="." default="release">
<property name="version" value="1.4" />
<!-- include the user settings -->
<property file="build.properties" />
<!-- all of the component homes -->
<property name="gazetteer.home" location="./Gazetteer" />
<property name="lang.home" location="./LanguageResources" />
<property name="toolbox.home" location="./OpenSextantToolbox" />
<property name="desktop.home" location="./Desktop" />
<property name="doc.home" location="./doc" />
<!-- the release dir -->
<property name="release.dir" location="./Release" />
<property name="release.target" value="${release.dir}/OpenSextant-v${version}" />
<property name="release.zip.file" value="${release.dir}/OpenSextant-Release-v${version}.zip"/>
<property name="release.zip.dev.file" value="${release.dir}/OpenSextant-Dev-Release-v${version}.zip"/>
<property name="release.doc" value="${release.target}/doc" />
<!--====================== Targets ============================-->
<target name="setup" >
<mkdir dir="${basedir}/Release" />
</target>
<!-- clean all of the components -->
<target name="clean" depends="setup">
<delete dir="${release.target}"/>
<delete file="${release.zip.file}"/>
<subant target="clean">
<fileset dir="${toolbox.home}" includes="build.xml" />
<!-- fileset dir="${gazetteer.home}" includes="build.xml" /-->
<fileset dir="${lang.home}" includes="build.xml" />
<fileset dir="${desktop.home}" includes="build.xml" />
</subant>
</target>
<!-- build all of the components -->
<target name="build" depends="">
<subant target="build">
<fileset dir="${toolbox.home}" includes="build.xml" />
<!-- fileset dir="${gazetteer.home}" includes="build.xml" /-->
<fileset dir="${lang.home}" includes="build.xml" />
</subant>
</target>
<!-- Generate JavaDoc documentation for all projects -->
<path id="compile.classpath">
<fileset dir="${release.target}/lib" includes="**/*.jar" />
</path>
<target name="javadoc" >
<javadoc destdir="${release.doc}/javadoc" packagenames="*" classpathref="compile.classpath"
encoding="utf-8" access="public" windowtitle="OpenSextant JavaDoc" source="${java_level}">
<sourcepath>
<pathelement location="${toolbox.home}/src" />
<pathelement location="${commons.home}/src/main/java" />
<!-- Xponents -->
<pathelement location="${xponents.home}/FlexPat/src/main/java" />
<pathelement location="${xponents.home}/XCoord/src/main/java" />
<pathelement location="${xponents.home}/XText/src/main/java" />
<pathelement location="${xponents.home}/XTemporal/src/main/java" />
<pathelement location="${xponents.home}/PoLi/src/main/java" />
</sourcepath>
</javadoc>
</target>
<!-- Copy over the documentation -->
<target name="copy.doc" >
<mkdir dir="${release.doc}" />
<!-- Copy over the User Documentation - soon to be HTML; currently MS Word -->
<copy todir="${release.doc}">
<fileset dir="${doc.home}">
<filename name="OpenSextant Users Guide.docx"/>
</fileset>
</copy>
<!-- Copy NOTICE, LICENSE, etc.-->
<copy todir="${release.target}">
<fileset dir="${basedir}"> <filename name="*.txt"/> </fileset>
</copy>
<copy todir="${release.doc}">
<fileset dir="${doc.home}"> <filename name="Apache*.txt"/> </fileset>
</copy>
</target>
<target name="copy.doc.dev" depends="copy.doc" >
<copy todir="${release.doc}">
<fileset dir="${doc.home}">
<filename name="*.docx"/>
</fileset>
</copy>
</target>
<!-- Final Zip -->
<target name="package" >
<zip destfile="${release.zip.file}"
basedir="${release.dir}"
includes="OpenSextant-v${version}/**" />
</target>
<!-- Assemble pieces in Release folder -->
<target name="assemble" >
<!-- For now use the existing "release" target inside Toolbox and copy the result up -->
<subant target="release">
<fileset dir="${toolbox.home}" includes="build.xml" />
</subant>
<copy todir="${release.dir}/OpenSextant-v${version}">
<fileset dir="${toolbox.home}/release">
<include name="**/*" />
</fileset>
</copy>
<!-- NOTE: compmiling OSD depends on a built release of OpenSextant Toolbox
-->
<subant target="release" inheritall="true">
<fileset dir="${desktop.home}" includes="build.xml" />
</subant>
</target>
<!-- Build the release, then package it -->
<target name="release" depends="clean,build,assemble,copy.doc">
<!-- Package up a release. -->
<zip destfile="${release.zip.file}"
basedir="${release.dir}"
includes="OpenSextant-v${version}/**" />
</target>
<!-- DEVELOPER RELEASE: Build all Java Doc, as well as copying over scripts -->
<target name="release-dev" depends="clean,build,assemble,javadoc,copy.doc.dev" >
<mkdir dir="${release.target}/script" />
<copy todir="${release.target}/script">
<fileset dir="${toolbox.home}/script">
<include name="**/*" />
</fileset>
</copy>
<!-- Package up a release for developers -->
<zip destfile="${release.zip.dev.file}"
basedir="${release.dir}"
includes="OpenSextant-v${version}/**" />
</target>
</project>