Be extra careful about deleting existing IdP configuration directories.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 8 Jul 2005 22:08:22 +0000 (22:08 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 8 Jul 2005 22:08:22 +0000 (22:08 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1699 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

build.xml

index f4056a8..3519771 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -2,94 +2,96 @@
 
 <project name="Shibboleth" default="install" basedir=".">
 
-    <!-- Set global properties for this build -->
-    <property name="distnameWayf" value="shibboleth-wayf" />
-    <property name="root" value="." />
-    <property name="src" value="${root}/src/" />
-    <property name="tests" value="${root}/tests/" />
-    <property name="approot" value="${root}/webApplication/" />
-    <property name="appconfig" value="${src}/conf/" />
-    <property name="configroot" value="${root}/webAppConfig/" />
-    <property name="build" value="${approot}/WEB-INF/classes/" />
-    <property name="libdir" value="${approot}/WEB-INF/lib/" />
-    <property name="buildlibs" value="${root}/lib/" />
-    <property name="endorsed" value="${root}/endorsed/" />
-    <property name="distlibs" value="${root}/lib/" />
-    <property name="custom" value="${root}/custom/" />
-    <property name="custom.libs" value="${custom}/lib"/>
-    <property name="custom.webapges" value="${custom}/web"/>
-    <property name="dist" value="${root}/dist/" />
-    <property name="docs" value="${root}/doc/" />
-    <property name="javadocs" value="${docs}/api/" />
-
-    <property name="year" value="2002-2005"/>
-    <property name="copyright" value="Copyright &#169; ${year} UCAID. All Rights Reserved."/>
-
-
-    <!-- antcontrib tasks -->
-    <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildlibs}/ant-contrib.jar"/>
-
-    <!-- Import the tasks for building custom extensions -->
-    <import file="${custom}/extension-build.xml"/>
-
-    <!-- Construct the CLASSPATH -->
-    <path id="build.path">
-        <pathelement path="${classpath}" />
-        <pathelement location="${build}" />
-        <fileset dir="${custom}">
-            <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${endorsed}">
-            <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${libdir}">
-            <include name="**/*.jar" />
-        </fileset>
-        <fileset dir="${buildlibs}">
-            <include name="**/*.jar" />
-        </fileset>
-    </path>
-
-
-    <!-- Prepare directory structure for project build-->
-    <target name="init">
-        <mkdir dir="${build}" />
-        <mkdir dir="${dist}" />
-        <mkdir dir="${custom.libs}"/>
-        <mkdir dir="${custom.webapges}"/>
-
-        <if>
-            <not> <available file="build.properties" /> </not>
-            <then>
-                <copy file="conf/default.build.properties" tofile="build.properties" />
-            </then>
-        </if>
-
-        <property file="build.properties" />
-    </target>
-
-
-    <!-- This target should be run before checking code into the repository -->
-    <target name="pre-checkin" depends="compile, test-all, clean-all" />
-
-
-    <!-- Compile classes and move them to ${build} -->
-    <target name="compile" depends="init"
-       description="Compile source files">
+       <!-- Set global properties for this build -->
+       <property name="distnameWayf" value="shibboleth-wayf" />
+       <property name="root" value="." />
+       <property name="src" value="${root}/src/" />
+       <property name="tests" value="${root}/tests/" />
+       <property name="approot" value="${root}/webApplication/" />
+       <property name="appconfig" value="${src}/conf/" />
+       <property name="configroot" value="${root}/webAppConfig/" />
+       <property name="build" value="${approot}/WEB-INF/classes/" />
+       <property name="libdir" value="${approot}/WEB-INF/lib/" />
+       <property name="buildlibs" value="${root}/lib/" />
+       <property name="endorsed" value="${root}/endorsed/" />
+       <property name="distlibs" value="${root}/lib/" />
+       <property name="custom" value="${root}/custom/" />
+       <property name="custom.libs" value="${custom}/lib"/>
+       <property name="custom.webapges" value="${custom}/web"/>
+       <property name="dist" value="${root}/dist/" />
+       <property name="docs" value="${root}/doc/" />
+       <property name="javadocs" value="${docs}/api/" />
+
+       <property name="year" value="2002-2005"/>
+       <property name="copyright" value="Copyright &#169; ${year} UCAID. All Rights Reserved."/>
+
+
+       <!-- antcontrib tasks -->
+       <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildlibs}/ant-contrib.jar"/>
+
+       <!-- Import the tasks for building custom extensions -->
+       <import file="${custom}/extension-build.xml"/>
+
+       <!-- Construct the CLASSPATH -->
+       <path id="build.path">
+               <pathelement path="${classpath}" />
+               <pathelement location="${build}" />
+               <fileset dir="${custom}">
+                       <include name="**/*.jar" />
+               </fileset>
+               <fileset dir="${endorsed}">
+                       <include name="**/*.jar" />
+               </fileset>
+               <fileset dir="${libdir}">
+                       <include name="**/*.jar" />
+               </fileset>
+               <fileset dir="${buildlibs}">
+                       <include name="**/*.jar" />
+               </fileset>
+       </path>
+
+
+       <!-- Prepare directory structure for project build-->
+       <target name="init">
+               <mkdir dir="${build}" />
+               <mkdir dir="${dist}" />
+               <mkdir dir="${custom.libs}"/>
+               <mkdir dir="${custom.webapges}"/>
+
+               <if>
+                       <not> <available file="build.properties" /> </not>
+                       <then>
+                               <copy file="conf/default.build.properties" tofile="build.properties" />
+                       </then>
+               </if>
+
+               <property file="build.properties" />
+       </target>
+
+
+       <!-- This target should be run before checking code into the repository -->
+       <target name="pre-checkin" depends="compile, test-all, clean-all" />
+
+
+       <!-- Compile classes and move them to ${build} -->
+       <target name="compile" depends="init"
+               description="Compile source files">
                <!-- Compile the shib code into the build path -->
-        <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on" source="1.4">
-            <classpath refid="build.path" />
-        </javac>
+               <javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on" source="1.4">
+                       <classpath refid="build.path" />
+               </javac>
                <!-- Copy xml schemas to the build path -->
-        <copy todir="${build}/schemas">
-            <fileset dir="${src}/schemas"/>
-        </copy>
-        
-        <!-- Build extensions -->
-        <antcall target="build-exts">
-            <param name="exts.dir" value="${custom}"/>
-        </antcall>
-    </target>
+               <copy todir="${build}/schemas">
+                       <fileset dir="${src}/schemas"/>
+               </copy>
+
+               <!-- Build extensions -->
+               <!--
+               <antcall target="build-exts">
+                       <param name="exts.dir" value="${custom}"/>
+               </antcall>
+               -->
+       </target>
 
 
        <!-- Generate API docs -->
                        author='true' version='true'
                        windowtitle='Shibboleth Java API' doctitle='Shibboleth Java API'
                        bottom='${copyright}'>
-                <classpath refid="build.path" />
-        </javadoc>
-       </target>
-
-
-    <!-- Build command-line utilities -->
-    <target name="build-util" depends="compile">
-        <jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
-    </target>
-
-    <!-- Cleanup after the build, test, and distribution processes -->
-    <target name="clean" depends="clean-all" />
-    <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util, clean-ext" />
-    <target name="clean-build">
-        <delete dir="${build}" />
-        <delete dir="${custom.libs}"/>
-        <delete dir="${custom.webapges}"/>
-    </target>
-    <target name="clean-test">
-        <delete>
-            <fileset dir="${root}">
-                <include name="**/TEST*.txt" />
-            </fileset>
-        </delete>
-    </target>
-    <target name="clean-dist">
-        <delete dir="${dist}" />
-    </target>
+                       <classpath refid="build.path" />
+               </javadoc>
+       </target>
+
+
+       <!-- Build command-line utilities -->
+       <target name="build-util" depends="compile">
+               <jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
+       </target>
+
+       <!-- Cleanup after the build, test, and distribution processes -->
+       <target name="clean" depends="clean-all" />
+       <target name="clean-all" depends="clean-build, clean-dist, clean-test, clean-javadocs, clean-util, clean-ext" />
+       <target name="clean-build">
+               <delete dir="${build}" />
+               <delete dir="${custom.libs}"/>
+               <delete dir="${custom.webapges}"/>
+       </target>
+       <target name="clean-test">
+               <delete>
+                       <fileset dir="${root}">
+                               <include name="**/TEST*.txt" />
+                       </fileset>
+               </delete>
+       </target>
+       <target name="clean-dist">
+               <delete dir="${dist}" />
+       </target>
        <target name="clean-javadocs">
                <delete dir="${javadocs}" />
        </target>
-    <target name="clean-util">
-        <delete>
-            <fileset dir="${buildlibs}">
-                <include name="shib-util.jar" />
-            </fileset>
-        </delete>
-    </target>
+       <target name="clean-util">
+               <delete>
+                       <fileset dir="${buildlibs}">
+                               <include name="shib-util.jar" />
+                       </fileset>
+               </delete>
+       </target>
        <!-- For IDE development, run this target first to delete all
-                directories generated by the install process before
-                recreating and reinstalling everything. -->
+       directories generated by the install process before
+       recreating and reinstalling everything. -->
        <target name="clean-install" depends="init" 
                description="Delete old configuration and Tomcat webapp directories.">
                <delete dir="${idp.home}" />
 
 
        <!-- Add to the classpath for unit tests -->
-   <path id="test.path">
-      <path refid="build.path"/>
-      <pathelement location="${tests}"/>
-    </path>
+       <path id="test.path">
+               <path refid="build.path"/>
+               <pathelement location="${tests}"/>
+       </path>
 
        <!-- Compile classes needed for unit testing -->
-    <target name="compile-tests" depends="compile">
-        <javac srcdir="${tests}" destdir="${build}" includes="**/*.java" debug="on" source="1.4">
-            <classpath refid="build.path" />
-        </javac>
-    </target>
+       <target name="compile-tests" depends="compile">
+               <javac srcdir="${tests}" destdir="${build}" includes="**/*.java" debug="on" source="1.4">
+                       <classpath refid="build.path" />
+               </javac>
+       </target>
 
-    <!-- Run automated tests on compiled code -->
-    <target name="test-all" depends="test-IdP, test-SP" />
+       <!-- Run automated tests on compiled code -->
+       <target name="test-all" depends="test-IdP, test-SP" />
 
-    <target name="test-IdP" depends="compile-tests">
-        <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
+       <target name="test-IdP" depends="compile-tests">
+               <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
                        <jvmarg value="-Djava.endorsed.dirs=${endorsed}" />
-            <classpath refid="test.path" />
-            <formatter type="plain" />
-            <test name="edu.internet2.middleware.shibboleth.aa.arp.ArpTests" />
+                       <classpath refid="test.path" />
+                       <formatter type="plain" />
+                       <test name="edu.internet2.middleware.shibboleth.aa.arp.ArpTests" />
                        <test name="edu.internet2.middleware.shibboleth.aa.attrresolv.ResolverTests" />
                        <test name="edu.internet2.middleware.shibboleth.common.CredentialsTests" />
                        <test name="edu.internet2.middleware.shibboleth.common.provider.NameMapperTests" />
                        <test name="edu.internet2.middleware.shibboleth.common.TrustTests" />
                        <test name="edu.internet2.middleware.shibboleth.idp.provider.DNHostNameExtractionTests" />
                        <test name="edu.internet2.middleware.shibboleth.metadata.MetadataTests" />
-        </junit>
-    </target>
+               </junit>
+       </target>
 
-    <target name="test-SP" depends="compile-tests">
-        <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
+       <target name="test-SP" depends="compile-tests">
+               <junit printsummary="no" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${root}">
                        <jvmarg value="-Djava.endorsed.dirs=${endorsed}" />
-            <classpath refid="test.path" />
-            <formatter type="plain" />
-            <test name="edu.internet2.middleware.shibboleth.aap.AAPTests" />
-        </junit>
-    </target>
-
-
-    <!-- Tomcat Management -->
-    <target name="setupTomcatTasks">
-       <path id="tomcat.classpath">
-                   <fileset dir="${tomcat.home}/server/lib" includes="catalina-ant.jar"/>
-           </path>
-
-       <taskdef name="tomcatStart" classname="org.apache.catalina.ant.StartTask" classpathref="tomcat.classpath"/>
-       <taskdef name="tomcatStop" classname="org.apache.catalina.ant.StopTask" classpathref="tomcat.classpath"/>
-           <taskdef name="tomcatDeploy" classname="org.apache.catalina.ant.DeployTask" classpathref="tomcat.classpath"/>
-       <taskdef name="tomcatUndeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="tomcat.classpath"/>
-       </target>
-    
-    <target name="tomcat.start" depends="setupTomcatTasks" description="Start a deployed webapp using Tomcat manager">
-        <tomcatStart url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"/>
-    </target>
-
-    <target name="tomcat.stop" depends="setupTomcatTasks" description="Stop a deployed webapp using Tomcat manager">
-        <tomcatStop url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"/>
-    </target>
-
-    <target name="tomcat.deploy" depends="setupTomcatTasks" description="Upload and deploy using Tomcat manager">
-        <tomcatDeploy url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"
-               war="file:${basedir}/${dist}/${idp.webapp.name}.war"/>
-    </target>
-
-    <target name="tomcat.undeploy" depends="setupTomcatTasks" description="Undeploy using Tomcat manager">
-        <tomcatUndeploy url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"/>
-    </target>
-       
-    
-    <!-- Automated key generation for crypto handles -->
+                       <classpath refid="test.path" />
+                       <formatter type="plain" />
+                       <test name="edu.internet2.middleware.shibboleth.aap.AAPTests" />
+               </junit>
+       </target>
+
+
+       <!-- Tomcat Management -->
+       <target name="setupTomcatTasks">
+               <path id="tomcat.classpath">
+                       <fileset dir="${tomcat.home}/server/lib" includes="catalina-ant.jar"/>
+               </path>
+
+               <taskdef name="tomcatStart" classname="org.apache.catalina.ant.StartTask" classpathref="tomcat.classpath"/>
+               <taskdef name="tomcatStop" classname="org.apache.catalina.ant.StopTask" classpathref="tomcat.classpath"/>
+               <taskdef name="tomcatDeploy" classname="org.apache.catalina.ant.DeployTask" classpathref="tomcat.classpath"/>
+               <taskdef name="tomcatUndeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="tomcat.classpath"/>
+       </target>
+
+       <target name="tomcat.start" depends="setupTomcatTasks" description="Start a deployed webapp using Tomcat manager">
+               <tomcatStart url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"/>
+       </target>
+
+       <target name="tomcat.stop" depends="setupTomcatTasks" description="Stop a deployed webapp using Tomcat manager">
+               <tomcatStop url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"/>
+       </target>
+
+       <target name="tomcat.deploy" depends="setupTomcatTasks" description="Upload and deploy using Tomcat manager">
+               <tomcatDeploy url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"
+                       war="file:${basedir}/${dist}/${idp.webapp.name}.war"/>
+       </target>
+
+       <target name="tomcat.undeploy" depends="setupTomcatTasks" description="Undeploy using Tomcat manager">
+               <tomcatUndeploy url="${tomcat.url}" username="${tomcat.username}" password="${tomcat.password}" path="/${idp.webapp.name}"/>
+       </target>
+
+
+       <!-- Automated key generation for crypto handles -->
        <target name="genSecret" depends="compile">
-       <taskdef name="genSecret" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
+               <taskdef name="genSecret" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
                <genSecret keyStorePath="${appconfig}/handle.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />
        </target>
 
 
        <!-- Generate salt for use with targetted id -->
-    <target name="genSalt" depends="compile">
-        <taskdef name="genSalt" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
-        <genSalt keyStorePath="${appconfig}/persistent.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />
-    </target>
-       
+       <target name="genSalt" depends="compile">
+               <taskdef name="genSalt" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
+               <genSalt keyStorePath="${appconfig}/persistent.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />
+       </target>
+
        <target name="exampleCertificates">
                <!--
                This target provides an example of the generation of
                        keystore="${tomcat.home}/conf/idp-example.jks"
                        keyalg="RSA" validity="365"
                        dname="cn=idp.example.org, o=example.org, c=US"
-               />
+                       />
                <genkey alias="tomcat" storepass="exampleorg"
                        keystore="${tomcat.home}/conf/sp-example.jks"
                        keyalg="RSA" validity="365"
                        dname="cn=sp.example.org, o=example.org, c=US"
-               />
+                       />
        </target>
 
-    
+
        <!-- Package Shibboleth -->
-    <target name="package-idp" depends="compile, install.url" description="Creates the IdP war file and moves it to ${dist}">
-       <!-- copy values to deployment descriptor -->
-        <copy file="${configroot}/${idp.deployment.descriptor}" tofile="${configroot}/idp.xml" overwrite="true" />
-        <replace file="${configroot}/idp.xml" token="$IDP_HOME$" value="${idp.home.url}" />
-       
-       <!-- create the war -->
-        <war warfile="${dist}/${idp.webapp.name}.war" webxml="${configroot}/idp.xml" basedir="${approot}" update="no">
-            <!-- Grab any custom extension libraries -->
-            <lib dir="${custom.libs}"/>
-            
-            <!-- Grab any web material from custom extensions -->
-            <fileset dir="${custom.webapges}"/>
-        </war>
-       
-       <!-- clean up generated descriptor -->
-        <delete file="${configroot}/idp.xml"/>
-    </target>
-       
-    <target name="package-wayf" depends="compile" description="Creates the WAYF war and moves it to ${dist}">
-        <war warfile="${dist}/${distnameWayf}.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
-    </target>
-       
-    <target name="package-sp" depends="compile, install.url" description="Creates the Java SP war and moves it to ${dist}">
-       <!-- copy values to deployment descriptor -->
-        <copy file="${configroot}/${sp.deployment.descriptor}" tofile="${configroot}/sp.xml" overwrite="true" />
-        <replace file="${configroot}/sp.xml" token="$SP_HOME$" value="${sp.home.url}" />
-       
-       <!-- create the war -->
-        <war warfile="${dist}/${sp.webapp.name}.war" webxml="${configroot}/sp.xml" basedir="${approot}" update="no">
-            <!-- Grab any custom extension libraries -->
-            <lib dir="${custom.libs}"/>
-                        
-            <!-- Grab any web material from custom extensions -->
-            <fileset dir="${custom.webapges}"/>
-        </war>
-       
-       <!-- clean up generated descriptor -->
-        <delete file="${configroot}/sp.xml"/>
-       </target>
-
-       
-    <!-- Install Shibboleth -->
-    <target name="install.init">
-        <taskdef name="xinput" classname="edu.internet2.middleware.shibboleth.utils.ant.XInput" classpath="${build}" />
-        <typedef name="xoption" classname="edu.internet2.middleware.shibboleth.utils.ant.XInputOption" classpath="${build}" />
-    </target>
-
-    <target name="install.url">
+       <target name="package-idp" depends="compile, install.url" description="Creates the IdP war file and moves it to ${dist}">
+               <!-- copy values to deployment descriptor -->
+               <copy file="${configroot}/${idp.deployment.descriptor}" tofile="${configroot}/idp.xml" overwrite="true" />
+               <replace file="${configroot}/idp.xml" token="$IDP_HOME$" value="${idp.home.url}" />
+
+               <!-- create the war -->
+               <war warfile="${dist}/${idp.webapp.name}.war" webxml="${configroot}/idp.xml" basedir="${approot}" update="no">
+                       <!-- Grab any custom extension libraries -->
+                       <lib dir="${custom.libs}"/>
+
+                       <!-- Grab any web material from custom extensions -->
+                       <fileset dir="${custom.webapges}"/>
+               </war>
+
+               <!-- clean up generated descriptor -->
+               <delete file="${configroot}/idp.xml"/>
+       </target>
+
+       <target name="package-wayf" depends="compile" description="Creates the WAYF war and moves it to ${dist}">
+               <war warfile="${dist}/${distnameWayf}.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
+       </target>
+
+       <target name="package-sp" depends="compile, install.url" description="Creates the Java SP war and moves it to ${dist}">
+               <!-- copy values to deployment descriptor -->
+               <copy file="${configroot}/${sp.deployment.descriptor}" tofile="${configroot}/sp.xml" overwrite="true" />
+               <replace file="${configroot}/sp.xml" token="$SP_HOME$" value="${sp.home.url}" />
+
+               <!-- create the war -->
+               <war warfile="${dist}/${sp.webapp.name}.war" webxml="${configroot}/sp.xml" basedir="${approot}" update="no">
+                       <!-- Grab any custom extension libraries -->
+                       <lib dir="${custom.libs}"/>
+
+                       <!-- Grab any web material from custom extensions -->
+                       <fileset dir="${custom.webapges}"/>
+               </war>
+
+               <!-- clean up generated descriptor -->
+               <delete file="${configroot}/sp.xml"/>
+       </target>
+
+
+       <!-- Install Shibboleth -->
+       <target name="install.init">
+               <taskdef name="xinput" classname="edu.internet2.middleware.shibboleth.utils.ant.XInput" classpath="${build}" />
+               <typedef name="xoption" classname="edu.internet2.middleware.shibboleth.utils.ant.XInputOption" classpath="${build}" />
+       </target>
+
+       <target name="install.url">
                <taskdef name="urlconvert" classname="edu.internet2.middleware.shibboleth.utils.ant.URLConvert" classpath="${build}"/>
                <urlconvert path="${idp.home}" addProperty="idp.home.url"/>
                <urlconvert path="${sp.home}" addProperty="sp.home.url"/>
-    </target>
-
-    <target name="install" depends="init, install.init" description="Install Shibboleth">
-        <if>
-            <xinput type="confirm" defaultvalue="y">Do you want to install the Shibboleth Identity Provider?</xinput>
-            <then>
-                <input message="What name do you want to use for the Identity Provider web application? [default: ${idp.webapp.name}]" 
-                    addproperty="idp.webapp.name.input" defaultValue="${idp.webapp.name}" />
-                <var name="idp.webapp.name" value="${idp.webapp.name.input}" />
+       </target>
 
-                <antcall target="install.idp" />
-            </then>
-        </if>
-    </target>
+       <target name="install" depends="init, install.init" description="Install Shibboleth">
+               <if>
+                       <xinput type="confirm" defaultvalue="y">Do you want to install the Shibboleth Identity Provider?</xinput>
+                       <then>
+                               <input message="What name do you want to use for the Identity Provider web application? [default: ${idp.webapp.name}]" 
+                                       addproperty="idp.webapp.name.input" defaultValue="${idp.webapp.name}" />
+                               <var name="idp.webapp.name" value="${idp.webapp.name.input}" />
+
+                               <antcall target="install.idp" />
+                       </then>
+               </if>
+       </target>
 
        <target name="install.idp" depends="init, install.init">
-        <xinput message="Deploying the java web application.  Do you want to install it directly onto the filesystem or use the tomcat manager application?" 
-            addproperty="idp.install-type.input" type="menu" casesensitive="no" defaultValue="${idp.install-type}">
-            <xoption value="filesystem.prompt">filesystem</xoption>
-            <xoption>manager</xoption>
-        </xinput>
-        <var name="idp.install-type" value="${idp.install-type.input}" />
-        
-        <antcall target="install.idp.${idp.install-type}" />
-    </target>
-
-    <!-- Prompt user for filesystem installation options and save them to build.properties -->
-    <target name="install.idp.filesystem.prompt" depends="init, install.init">
-        <input message="Select an installation base for the Shibboleth Identity Provider [default: ${idp.home}]"
-            addproperty="idp.home.input" defaultvalue="${idp.home}" />
-        <var name="idp.home" value="${idp.home.input}" />
-        <input message="Enter tomcat home directory [default: ${tomcat.home}]"
-            addproperty="tomcat.home.input" defaultvalue="${tomcat.home}" />
-        <var name="tomcat.home" value="${tomcat.home.input}" />
-        
-        <if>
+               <xinput message="Deploying the java web application.  Do you want to install it directly onto the filesystem or use the tomcat manager application?" 
+                       addproperty="idp.install-type.input" type="menu" casesensitive="no" defaultValue="${idp.install-type}">
+                       <xoption value="filesystem.prompt">filesystem</xoption>
+                       <xoption>manager</xoption>
+               </xinput>
+               <var name="idp.install-type" value="${idp.install-type.input}" />
+
+               <antcall target="install.idp.${idp.install-type}" />
+       </target>
+
+       <!-- Prompt user for filesystem installation options and save them to build.properties -->
+       <target name="install.idp.filesystem.prompt" depends="init, install.init">
+               <input message="Select an installation base for the Shibboleth Identity Provider [default: ${idp.home}]"
+                       addproperty="idp.home.input" defaultvalue="${idp.home}" />
+               <var name="idp.home" value="${idp.home.input}" />
+               <input message="Enter tomcat home directory [default: ${tomcat.home}]"
+                       addproperty="tomcat.home.input" defaultvalue="${tomcat.home}" />
+               <var name="tomcat.home" value="${tomcat.home.input}" />
+
+               <if>
                        <available file="${idp.home}/etc" />
-            <then>
-                <xinput type="confirm" addproperty="copy-idp-conf">WARNING!! The directory `${idp.home}${file.separator}etc` already exists.  Do you want to overwrite the existing configuration?</xinput>
-            </then>
-            <else>
-                <property name="copy-idp-conf" value="y" />
-            </else>
-        </if>
-
-        <antcall target="install.idp.filesystem" />
-        <antcall target="savePropertyFile" />
-    </target>
-
-    <!-- Install Shibboleth IdP to filesystem using the properties in build.properties -->
-    <target name="install.idp.filesystem" depends="init, install.init, build-util, install.url, package-idp" 
-        description="Install Shibboleth IdP to filesystem using the properties in build.properties">
-
-        <!-- Move IdP war to Tomcat deployment directory -->
-        <copy file="${dist}/${idp.webapp.name}.war" tofile="${tomcat.home}/webapps/${idp.webapp.name}.war" />
-
-        <!-- copy IdP jars and utilities -->
-        <copy todir="${idp.home}/lib">
-            <fileset dir="lib" includesfile="conf/idp-lib.include" />
-        </copy>
-
-        <copy todir="${idp.home}/bin">
-            <fileset dir="bin"/>
-        </copy>
+                       <then>
+                               <xinput type="confirm" addproperty="copy-idp-conf1">The directory `${idp.home}${file.separator}etc` already exists.  Do you want to overwrite the existing configuration?</xinput>
+                               <if>
+                                       <equals arg1="${copy-idp-conf1}" arg2="y" />
+                                       <then>
+                                               <xinput type="confirm" addproperty="copy-idp-conf">WARNING!!! You are about to delete your Shibboleth IdP configuration.  Are you certain you certain this is what you want?</xinput>
+                                       </then>
+                               </if>
+                       </then>
+                       <else>
+                               <property name="copy-idp-conf" value="y" />
+                       </else>
+               </if>
+
+               <antcall target="install.idp.filesystem" />
+               <antcall target="savePropertyFile" />
+       </target>
+
+       <!-- Install Shibboleth IdP to filesystem using the properties in build.properties -->
+       <target name="install.idp.filesystem" depends="init, install.init, build-util, install.url, package-idp" 
+               description="Install Shibboleth IdP to filesystem using the properties in build.properties">
+
+               <!-- Move IdP war to Tomcat deployment directory -->
+               <copy file="${dist}/${idp.webapp.name}.war" tofile="${tomcat.home}/webapps/${idp.webapp.name}.war" />
+
+               <!-- copy IdP jars and utilities -->
+               <copy todir="${idp.home}/lib">
+                       <fileset dir="lib" includesfile="conf/idp-lib.include" />
+               </copy>
+
+               <copy todir="${idp.home}/bin">
+                       <fileset dir="bin"/>
+               </copy>
                <chmod dir="${idp.home}/bin" perm="ug+rx" includes="**/*"/>
 
-        <mkdir dir="${idp.home}/logs" />
-
-        <!-- copy IdP configuration -->
-        <if>
-            <or>
-                <equals arg1="${copy-idp-conf}" arg2="y" />
-                <not> <available file="${idp.home}/etc" /> </not>
-            </or>
-            <then>
-                <delete dir="${idp.home}/etc" />
-                <antcall target="install.idp.filesystem.config" />
-            </then>
-        </if>
-    </target>
-
-    <!-- Install Shibboleth SP to filesystem using the properties in build.properties -->
-    <target name="install.sp.filesystem" depends="init, install.init, build-util, install.url, package-sp" 
-        description="Install Shibboleth SP to filesystem using the properties in build.properties">
-
-       <!-- Move SP war to Tomcat deployment directory -->
-        <copy file="${dist}/${sp.webapp.name}.war" tofile="${tomcat.home}/webapps/${sp.webapp.name}.war" />
-
-        <!-- copy sp jars and utilities -->
-        <copy todir="${sp.home}/lib">
-            <fileset dir="lib" includesfile="conf/idp-lib.include" />
-        </copy>
-
-        <copy todir="${sp.home}/bin">
-            <fileset dir="bin"/>
-        </copy>
+               <mkdir dir="${idp.home}/logs" />
+
+               <!-- copy IdP configuration -->
+               <if>
+                       <or>
+                               <equals arg1="${copy-idp-conf}" arg2="y" />
+                               <not> <available file="${idp.home}/etc" /> </not>
+                       </or>
+                       <then>
+                               <delete dir="${idp.home}/etc" />
+                               <antcall target="install.idp.filesystem.config" />
+                       </then>
+               </if>
+       </target>
+
+       <!-- Install Shibboleth SP to filesystem using the properties in build.properties -->
+       <target name="install.sp.filesystem" depends="init, install.init, build-util, install.url, package-sp" 
+               description="Install Shibboleth SP to filesystem using the properties in build.properties">
+
+               <!-- Move SP war to Tomcat deployment directory -->
+               <copy file="${dist}/${sp.webapp.name}.war" tofile="${tomcat.home}/webapps/${sp.webapp.name}.war" />
+
+               <!-- copy sp jars and utilities -->
+               <copy todir="${sp.home}/lib">
+                       <fileset dir="lib" includesfile="conf/idp-lib.include" />
+               </copy>
+
+               <copy todir="${sp.home}/bin">
+                       <fileset dir="bin"/>
+               </copy>
                <chmod dir="${sp.home}/bin" perm="ug+rx" includes="**/*"/>
 
-        <mkdir dir="${sp.home}/logs" />
-
-        <!-- copy sp configuration -->
-        <if>
-            <or>
-                <equals arg1="${copy-sp-conf}" arg2="y" />
-                <not> <available file="${sp.home}/etc" /> </not>
-            </or>
-            <then>
-                <delete dir="${sp.home}/etc" />
-                <antcall target="install.sp.filesystem.config" />
-            </then>
-        </if>
-    </target>
-       
-       
-    <!-- copy shibboleth configuration to $IDP_HOME/etc, overwriting any existing configuration -->
+               <mkdir dir="${sp.home}/logs" />
+
+               <!-- copy sp configuration -->
+               <if>
+                       <or>
+                               <equals arg1="${copy-sp-conf}" arg2="y" />
+                               <not> <available file="${sp.home}/etc" /> </not>
+                       </or>
+                       <then>
+                               <delete dir="${sp.home}/etc" />
+                               <antcall target="install.sp.filesystem.config" />
+                       </then>
+               </if>
+       </target>
+
+
+       <!-- copy shibboleth configuration to $IDP_HOME/etc, overwriting any existing configuration -->
        <target name="install.idp.filesystem.config" depends="init, install.init, install.url">
-        <mkdir dir="${idp.home}/etc" />
-        <copy todir="${idp.home}/etc" overwrite="true">
-            <fileset dir="${src}/conf" includesfile="conf/idp-conf.include"/>
-        </copy>
+               <mkdir dir="${idp.home}/etc" />
+               <copy todir="${idp.home}/etc" overwrite="true">
+                       <fileset dir="${src}/conf" includesfile="conf/idp-conf.include"/>
+               </copy>
                <move file="${idp.home}/etc/dist.idp.xml" tofile="${idp.home}/etc/idp.xml" overwrite="true" />
-        <replace file="${idp.home}/etc/idp.xml" token="$IDP_HOME$" value="${idp.home.url}" />
+               <replace file="${idp.home}/etc/idp.xml" token="$IDP_HOME$" value="${idp.home.url}" />
                <replace file="${idp.home}/etc/idp.xml" token="$IDP_WEBAPP_NAME$" value="${idp.webapp.name}" />
-    </target>
-       
-    <!-- copy SP configuration to $SP_HOME$/etc, overwriting any existing configuration -->
+       </target>
+
+       <!-- copy SP configuration to $SP_HOME$/etc, overwriting any existing configuration -->
        <target name="install.sp.filesystem.config" depends="init, install.init">
-        <mkdir dir="${sp.home}/etc" />
-        <copy todir="${sp.home}/etc" overwrite="true">
-            <fileset dir="${src}/conf" includesfile="conf/sp-conf.include"/>
-        </copy>
+               <mkdir dir="${sp.home}/etc" />
+               <copy todir="${sp.home}/etc" overwrite="true">
+                       <fileset dir="${src}/conf" includesfile="conf/sp-conf.include"/>
+               </copy>
                <move file="${sp.home}/etc/dist.sp.xml" tofile="${sp.home}/etc/sp.xml" overwrite="true" />
-        <replace file="${sp.home}/etc/sp.xml" token="$SP_HOME$" value="${sp.home.url}" />
-    </target>
+               <replace file="${sp.home}/etc/sp.xml" token="$SP_HOME$" value="${sp.home.url}" />
+       </target>
 
-    <!-- install Shibboleth-IdP war using tomcat's manager app -->
+       <!-- install Shibboleth-IdP war using tomcat's manager app -->
        <target name="install.idp.manager" depends="init, install.init">
-        <antcall target="setupTomcatTasks" />
-        
-        <input message="Enter local tomcat directory [default: ${tomcat.home}]" addproperty="tomcat.home.input" defaultValue="${tomcat.home}" />
-        <var name="tomcat.home" value="${tomcat.home.input}" />
-        
-        <input message="Enter tomcat url [default: ${tomcat.url}]" addproperty="tomcat.url.input" defaultValue="${tomcat.url}" />
-        <var name="tomcat.url" value="${tomcat.url.input}" />
-        
-        <input message="Enter tomcat username [default: ${tomcat.username}]" addproperty="tomcat.username.input" defaultValue="${tomcat.username}" />
-        <var name="tomcat.username" value="${tomcat.username.input}" />
-        
-        <input message="Enter tomcat password [default: ${tomcat.password}]" addproperty="tomcat.password.input" defaultValue="${tomcat.password}" />
-        <var name="tomcat.password" value="${tomcat.password.input}" />
-        
-        <antcall target="tomcat.deploy" />
-        <antcall target="savePropertyFile" />
-    </target>
-
-    <!-- save configuration to build.properties -->
-    <target name="savePropertyFile">
-        <propertyfile file="build.properties">
-            <entry key="idp.home" value="${idp.home}" />
-            <entry key="sp.home" value="${sp.home}" />
-            <entry key="idp.webapp.name" value="${idp.webapp.name}" />
-            <entry key="sp.webapp.name" value="${sp.webapp.name}" />
-            <entry key="idp.install-type" value="${idp.install-type}" />
-            <entry key="tomcat.home" value="${tomcat.home}" />
-            <entry key="tomcat.url" value="${tomcat.url}" />
-            <entry key="tomcat.username" value="${tomcat.username}" />
-            <entry key="tomcat.password" value="${tomcat.password}" />
-        </propertyfile>
-    </target>
+               <antcall target="setupTomcatTasks" />
+
+               <input message="Enter local tomcat directory [default: ${tomcat.home}]" addproperty="tomcat.home.input" defaultValue="${tomcat.home}" />
+               <var name="tomcat.home" value="${tomcat.home.input}" />
+
+               <input message="Enter tomcat url [default: ${tomcat.url}]" addproperty="tomcat.url.input" defaultValue="${tomcat.url}" />
+               <var name="tomcat.url" value="${tomcat.url.input}" />
+
+               <input message="Enter tomcat username [default: ${tomcat.username}]" addproperty="tomcat.username.input" defaultValue="${tomcat.username}" />
+               <var name="tomcat.username" value="${tomcat.username.input}" />
+
+               <input message="Enter tomcat password [default: ${tomcat.password}]" addproperty="tomcat.password.input" defaultValue="${tomcat.password}" />
+               <var name="tomcat.password" value="${tomcat.password.input}" />
+
+               <antcall target="tomcat.deploy" />
+               <antcall target="savePropertyFile" />
+       </target>
+
+       <!-- save configuration to build.properties -->
+       <target name="savePropertyFile">
+               <propertyfile file="build.properties">
+                       <entry key="idp.home" value="${idp.home}" />
+                       <entry key="sp.home" value="${sp.home}" />
+                       <entry key="idp.webapp.name" value="${idp.webapp.name}" />
+                       <entry key="sp.webapp.name" value="${sp.webapp.name}" />
+                       <entry key="idp.install-type" value="${idp.install-type}" />
+                       <entry key="tomcat.home" value="${tomcat.home}" />
+                       <entry key="tomcat.url" value="${tomcat.url}" />
+                       <entry key="tomcat.username" value="${tomcat.username}" />
+                       <entry key="tomcat.password" value="${tomcat.password}" />
+               </propertyfile>
+       </target>
 </project>