summaryrefslogtreecommitdiff
path: root/src/installer/resources/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/installer/resources/build.xml')
-rw-r--r--src/installer/resources/build.xml68
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