forked from mhermida/ncWMS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildTds.xml
executable file
·174 lines (151 loc) · 7.41 KB
/
buildTds.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
166
167
168
169
170
171
172
173
174
<?xml version="1.0" encoding="UTF-8"?>
<project name="ncWMS for TDS" default="cleanBuildEdalAndNcwmsSrcAndJar" basedir=".">
<description>Build edal.jar and ncwms.jar for use by TDS.</description>
<tstamp>
<format property="build.time" pattern="yyyy-MM-dd HH:mm:ss" timezone="GMT"/>
<format property="build.time.number" pattern="yyyyMMdd.HHmm" timezone="GMT"/>
</tstamp>
<property name="build.number" value="${build.time.number}" />
<property name="build.name" value="${build.number}" />
<property name="release.version" value="4.3"/>
<property name="release.version.minor" value="${release.version}.${build.number}"/>
<property name="release.dir.name" value="${release.version}.${build.name}"/>
<property name="ncwmsForTds.release.version" value="1.0.tds.${release.version.minor}" />
<property name="javac.debug" value="true" />
<property name="javac.debuglevel" value="lines,vars,source" />
<property name="src.dir" location="${basedir}/src/java"/>
<property name="lib.dir" location="${basedir}/web/WEB-INF/lib"/>
<property name="build.dir" value="${basedir}/target"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<path id="source.path">
<pathelement location="${src.dir}"/>
</path>
<patternset id="edal-sources">
<include name="uk/ac/rdg/resc/edal/time/**/*.java" />
</patternset>
<patternset id="ncwms-sources">
<include name="uk/ac/rdg/resc/edal/**/*.java" />
<exclude name="uk/ac/rdg/resc/edal/time/**/*.java"/>
<include name="uk/ac/rdg/resc/ncwms/**/*.java"/>
<exclude name="uk/ac/rdg/resc/ncwms/cache/**/*.java"/>
<exclude name="uk/ac/rdg/resc/ncwms/config/**/*.java"/>
<exclude name="uk/ac/rdg/resc/ncwms/security/**/*.java"/>
<exclude name="uk/ac/rdg/resc/ncwms/usagelog/h2/**/*.java"/>
</patternset>
<fileset id="compile.libraries" dir="${lib.dir}">
<patternset id="compile.libs">
<exclude name="acegi-security-1.0.4.jar" />
<exclude name="commons-codec-1.3.jar" />
<exclude name="commons-httpclient-3.1.jar" />
<exclude name="commons-logging-1.1.jar" />
<exclude name="ehcache-core-1.7.2.jar" />
<exclude name="grib-8.0.jar" />
<exclude name="h2.jar"/>
<exclude name="hsqldb-1.8.0.7.jar"/>
<exclude name="jakarta-oro-2.0.8.jar" />
<exclude name="jdom.jar" />
<exclude name="je-4.0.71.jar" />
<exclude name="jpeg2000.jar" />
<exclude name="log4j-1.2.15.jar" />
<exclude name="netcdf-4.2.jar"/>
<exclude name="opendap-2.2.jar" />
<exclude name="protobuf-java-2.1.0.jar" />
<exclude name="simple-xml-2.6.jar" />
<exclude name="unidatacommon.jar" />
</patternset>
</fileset>
<path id="compile.classpath">
<fileset refid="compile.libraries" />
</path>
<target name="init">
<mkdir dir="${build.classes.dir}"/>
<echo message="Initialize ${ant.project.name}"/>
</target>
<target name="clean" description="Deletes all files that are generated by the build.">
<delete dir="${build.dir}" failonerror="false"/>
</target>
<target name="compile" depends="init" description="compile ncwms for TDS">
<javac destdir="${build.classes.dir}" source="1.6" target="1.6"
debug="${javac.debug}" debuglevel="${javac.debuglevel}"
includeAntRuntime="false">
<src refid="source.path"/>
<patternset refid="ncwms-sources"/>
<classpath refid="compile.classpath"/>
</javac>
</target>
<property name="edal-time.jar" value="${build.dir}/edal-time.jar" />
<property name="edal-time.src.jar" value="${build.dir}/edal-time-src.jar" />
<!-- Build edal.jar -->
<target name="buildEdalTimeJar" description="Create edal-time.jar (assumes already compiled).">
<jar destfile="${edal-time.jar}">
<fileset dir="${build.classes.dir}">
<include name="uk/ac/rdg/resc/edal/time/**/*.class" />
</fileset>
<manifest>
<attribute name="Built-By" value="Unidata - ${user.name}"/>
<attribute name="Built-On" value="${build.time}"/>
<attribute name="Implementation-Title" value="ncWMS EDAL Time for TDS"/>
<attribute name="Implementation-Version" value="${ncwmsForTds.release.version}"/>
<attribute name="Implementation-Vendor" value="University of Reading"/>
</manifest>
</jar>
</target>
<target name="buildEdalSrc" description="Create edal-time-src.jar.">
<jar destfile="${edal-time.src.jar}">
<fileset dir="${src.dir}">
<patternset refid="edal-sources"/>
</fileset>
<manifest>
<attribute name="Built-By" value="Unidata - ${user.name}"/>
<attribute name="Built-On" value="${build.time}"/>
<attribute name="Implementation-Title" value="Source of ncWMS EDAL Time for TDS"/>
<attribute name="Implementation-Version" value="${ncwmsForTds.release.version}"/>
<attribute name="Implementation-Vendor" value="University of Reading"/>
</manifest>
</jar>
</target>
<property name="ncwms.jar" value="${build.dir}/ncwms.jar"/>
<property name="ncwms.src.jar" value="${build.dir}/ncwms-src.jar"/>
<target name="buildNcwmsJar" description="Create ncwms.jar (assumes already compiled).">
<jar destfile="${ncwms.jar}">
<fileset dir="${build.classes.dir}">
<exclude name="uk/ac/rdg/resc/edal/time/**/*.class"/>
</fileset>
<manifest>
<attribute name="Built-By" value="Unidata - ${user.name}"/>
<attribute name="Built-On" value="${build.time}"/>
<attribute name="Implementation-Title" value="ncWMS for TDS"/>
<attribute name="Implementation-Version" value="${ncwmsForTds.release.version}"/>
<attribute name="Implementation-Vendor" value="University of Reading"/>
</manifest>
</jar>
</target>
<target name="buildNcwmsSrc" description="Create ncwms-src.jar.">
<jar destfile="${ncwms.src.jar}">
<fileset dir="${src.dir}">
<patternset refid="ncwms-sources"/>
</fileset>
<manifest>
<attribute name="Built-By" value="Unidata - ${user.name}"/>
<attribute name="Built-On" value="${build.time}"/>
<attribute name="Implementation-Title" value="Source of ncWMS for TDS"/>
<attribute name="Implementation-Version" value="${ncwmsForTds.release.version}"/>
<attribute name="Implementation-Vendor" value="University of Reading"/>
</manifest>
</jar>
</target>
<target name="cleanBuildEdalAndNcwmsSrcAndJar" depends="clean, compile, buildEdalSrc, buildEdalTimeJar, buildNcwmsSrc, buildNcwmsJar" />
<property name="tds.lib.dir" value="../threddsFullGitHub/lib/release" />
<property name="tds.lib.src.dir" value="${tds.lib.dir}/source" />
<target name="pushSrcJarToThreddsWorkingCopy">
<copy todir="${tds.lib.dir}" file="${ncwms.jar}"
preservelastmodified="true" overwrite="true" />
<copy todir="${tds.lib.src.dir}" file="${ncwms.src.jar}"
preservelastmodified="true" overwrite="true" />
<copy todir="${tds.lib.dir}" file="${edal-time.jar}"
preservelastmodified="true" overwrite="true" />
<copy todir="${tds.lib.src.dir}" file="${edal-time.src.jar}"
preservelastmodified="true" overwrite="true" />
</target>
<target name="cleanPushSrcJarToThreddsWorkingCopy" depends="cleanBuildEdalAndNcwmsSrcAndJar,pushSrcJarToThreddsWorkingCopy" />
</project>