diff options
author | Leif Johansson <leifj@klapautius.mnt.se> | 2009-07-28 10:34:52 +0200 |
---|---|---|
committer | Leif Johansson <leifj@klapautius.mnt.se> | 2009-07-28 10:34:52 +0200 |
commit | 0a90384a9c7d840e88d9636271e8393a514647a0 (patch) | |
tree | 007540e79ec2a2e0e81bd0bd21e6eef9fc8bb205 /src/installer/resources/build.xml |
Import shibboleth ds 1.1.0v1.1.0upstreamds.swamid.se
Diffstat (limited to 'src/installer/resources/build.xml')
-rw-r--r-- | src/installer/resources/build.xml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/installer/resources/build.xml b/src/installer/resources/build.xml new file mode 100644 index 0000000..ae85dfa --- /dev/null +++ b/src/installer/resources/build.xml @@ -0,0 +1,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>
\ No newline at end of file |