blob: ae85dfa5490be77886169b762d95a2b14bfa1573 (
plain)
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
|
<project name="Shibboleth Discovery Service" basedir="../../.." default="install">
<property name="installer.dir" value="${basedir}/src/installer" />
<property name="resources.dir" value="${installer.dir}/resources" />
<property name="webapp.dir" value="${basedir}/src/main/webapp" />
<property name="war.name" value="discovery" />
<!-- Installation specific property file -->
<property file="${resources.dir}/install.properties" />
<!-- Load ant-contrib tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<!-- install - for deployment -->
<target name="install" description="Creates the discovery service home directory, install configuration files, and create the service's WAR.">
<input message="Is this a new installation? Answering 'yes' will overwrite your current configuration."
addproperty="new.install"
validargs="yes,no"
defaultvalue="no" />
<if>
<equals arg1="${new.install}" arg2="yes" />
<then>
<input message="Where should the Shibboleth Discovert Service software be installed?"
addproperty="ds.home.input"
defaultvalue="${ds.home}" />
<var name="ds.home" value="${ds.home.input}" />
<propertyfile file="${resources.dir}/install.properties">
<entry key="ds.home" value="${ds.home}" />
</propertyfile>
<mkdir dir="${ds.home}" />
<mkdir dir="${ds.home}/conf" />
<mkdir dir="${ds.home}/logs" />
<mkdir dir="${ds.home}/metadata" />
<mkdir dir="${ds.home}/war" />
<copy todir="${ds.home}/conf" preservelastmodified="true" overwrite="true">
<fileset dir="${resources.dir}" includes="wayfconfig.xml,logging.xml" />
<filterset begintoken="$" endtoken="$">
<filter token="DS_HOME" value="${ds.home}" />
</filterset>
</copy>
</then>
</if>
<!-- create - always - the web.xml -->
<copy file="${webapp.dir}/WEB-INF/web.xml" todir="${installer.dir}" preservelastmodified="true" overwrite="true">
<filterset begintoken="$" endtoken="$">
<filter token="DS_HOME" value="${ds.home}" />
</filterset>
</copy>
<!-- build the war file -->
<war warfile="${ds.home}/war/${war.name}.war" webxml="${installer.dir}/web.xml">
<lib dir="${basedir}/lib" />
<webinf dir="${webapp.dir}/WEB-INF" excludes="web.xml" />
<fileset dir="${webapp.dir}" excludes="WEB-INF/**" />
</war>
<!-- Remove generated web.xml -->
<delete file="${installer.dir}/web.xml" />
</target>
</project>
|