-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
203 lines (152 loc) · 6.62 KB
/
build.xml
File metadata and controls
203 lines (152 loc) · 6.62 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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0"?>
<!-- ESTAR Telescope Embedded Agent (TEA) -->
<project name="TEA" default="compile" basedir=".">
<description>
"ESTAR Telescope Embedded Agent"
</description>
<property environment="env"/>
<property name = "dev.home" value = "${env.LT_HOME}"/>
<property name = "class.dir" value = "${dev.home}/bin/estar/tea/java"/>
<property name = "dist.dir" value = "${dev.home}/public_html/estar/tea/deploy"/>
<property name = "estar.javalib" value = "${dev.home}/bin/estar/javalib"/>
<property name = "estar.clib" value = "${dev.home}/bin/estar/lib"/>
<property name = "javadoc.dir" value = "${dev.home}/public_html/estar/javadocs/org/estar/tea"/>
<!-- Prepare build directories -->
<target name = "prepare"
description = "Prepare build directories">
<mkdir dir = "${class.dir}"/>
<tstamp>
<format property="BUILD" pattern="yyyyMMdd_HHmm" locale="en"/>
</tstamp>
<echo message = "Build date: ${BUILD}"/>
</target>
<!-- Cleanup dross -->
<target name = "clean"
description = "Clean out dross">
<delete verbose = "true" >
<fileset dir="." includes="**/*~" defaultexcludes = "false"/>
</delete>
</target>
<!-- Compile all sources -->
<target name = "compile" depends = "prepare"
description = "Compile sources">
<javac srcdir = "." source="1.6" target="1.6" destdir = "${class.dir}" debug = "true" >
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${dev.home}/bin/javalib">
<include name = "*.jar"/>
<exclude name = "ngat_new_phase2.jar"/>
</fileset>
<fileset dir="${dev.home}/bin/javalib_third_party">
<include name = "*.jar"/>
</fileset>
<fileset dir="${dev.home}/bin/estar/javalib">
<include name = "*.jar"/>
</fileset>
</classpath>
<exclude name = "**/DNServerTest.java"/>
<exclude name = "**/DocChecker.java"/>
<!-- <exclude name = "**/test/*.java"/> -->
</javac>
</target>
<target name = "rmic"
depends = "compile"
description = "Generate RMI stubs">
<rmic debug = "true"
base = "${class.dir}"
includes = "org/estar/tea/DefaultEmbeddedAgentRequestHandler.class,
org/estar/tea/DefaultTelescopeAvailabilityPredictor.class"
stubversion = "1.2">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${dev.home}/bin/javalib">
<include name = "*.jar"/>
<exclude name = "ngat_new_phase2.jar"/>
</fileset>
<fileset dir="${dev.home}/bin/estar/javalib">
<include name = "*.jar"/>
</fileset>
</classpath>
</rmic>
</target>
<!-- Deploy to JAR -->
<target name = "jar"
depends = "rmic"
description = "Create class JAR">
<echo message = "Creating deployment jar - Build#: ${BUILD}"/>
<jar jarfile = "${dev.home}/bin/estar/javalib/tea.jar" basedir = "${class.dir}" />
</target>
<!-- Release for deployment -->
<target name = "release"
description = "Release to target host"
depends = "jar">
<echo message = "Generate deployment for ${ant.project.name}"/>
<input
message="Please enter deployment target:"
validargs= "ftnproxy,ltproxy,ftsproxy"
addproperty="scope"
defaultvalue="ltproxy"
/>
<echo message = "Generating target release for ${scope}"/>
<delete verbose = "true" file = "${dev.home}/tmp/tea_${scope}.tar"/>
<mkdir dir = "${dist.dir}"/>
<mkdir dir = "${dist.dir}/javalib"/>
<mkdir dir = "${dist.dir}/scripts"/>
<mkdir dir = "${dist.dir}/config"/>
<mkdir dir = "${dist.dir}/elib"/>
<!--<copy file="/home/dev/src/estar/jfits/jfits-0.91.jar" todir="${dist.dir}/javalib"/>-->
<copy file="${estar.javalib}/org_estar_astrometry.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_cluster.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_fits.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_io.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_io_test.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_rtml.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_rtml_test.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_toop.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/org_estar_toop_test.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/tea.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/activation.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/smtp.jar" todir="${dist.dir}/javalib"/>
<copy file="${estar.javalib}/mailapi.jar" todir="${dist.dir}/javalib"/>
<!-- <copy todir="${dist.dir}/scripts">
<fileset dir="scripts"/>
</copy> -->
<!-- <chmod dir="${dist.dir}/scripts" perm="ug+x" includes="**/*" verbose="true"/> -->
<copy file="config/${scope}.tea.properties" tofile="${dist.dir}/config/tea.properties"/>
<copy file="config/${scope}_filter-combo.properties" tofile="${dist.dir}/config/filter-combo.properties"/>
<copy todir="${dist.dir}/elib">
<fileset dir="${estar.clib}"/>
</copy>
<echo message="Tarring up, SCRIPTS are not included now"/>
<tar tarfile="${dev.home}/tmp/tea_${scope}.tar" basedir="${dist.dir}" />
<echo message="Your TEA release for ${scope} is now available in: ${dev.home}/tmp/tea_${scope}.tar"/>
<delete dir = "${dist.dir}"/>
</target>
<!-- javadoc -->
<target name = "javadoc"
description = "Create documentation"
depends = "compile">
<echo message = "Generating documentation"/>
<javadoc windowtitle = "Telescope Embedded Agent"
destdir = "${javadoc.dir}"
private = "true"
author = "true"
version = "true"
use = "true">
<fileset dir="java/org/estar/tea">
<include name = "*.java"/>
<exclude name = "**/DNServerTest.java"/>
<exclude name = "**/DocChecker.java"/>
</fileset>
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${dev.home}/bin/javalib">
<include name = "*.jar"/>
</fileset>
<fileset dir="${dev.home}/bin/estar/javalib">
<include name = "*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
</project>