Fixed minor problems with the install tasks.
[java-idp.git] / build.xml
index 2c577ff..0b078ef 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -24,8 +24,6 @@
        
     <!-- antcontrib tasks -->
     <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${buildlibs}/ant-contrib.jar"/>
-    <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}"/>
        
     <!-- Construct the CLASSPATH -->
     <path id="build.path">
         <var file="build.properties" />
     </target>
 
+    <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>
+
 
     <!-- This target should be run before checking code into the repository -->
     <target name="pre-checkin" depends="compile, test-all, clean-all" />
        
        
     <!-- Install Shibboleth -->
-    <target name="install" depends="init" description="Install Shibboleth">
+    <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>
         </if>
     </target>
 
-    <target name="install.idp">
+       <target name="install.idp" depends="init, install.init">
         <xinput message="Deploying java web application...  Do you want to install it directly onto the filesystem or use the tomcat manager application?" 
             addproperty="idp.install-type" type="menu" casesensitive="no">
             <xoption>filesystem</xoption>
         <antcall target="install.idp.${idp.install-type}" />
     </target>
 
-    <target name="install.idp.filesystem">
+    <target name="install.idp.filesystem" depends="init, install.init">
         
         <input message="Enter Shibboleth install directory [default: ${shib.home}]"
             addproperty="shib.home.input" defaultvalue="${shib.home}" />
         <antcall target="savePropertyFile" />
     </target>
 
-    <target name="install.idp.filesystem.config">
+       <target name="install.idp.filesystem.config" depends="init, install.init">
         <mkdir dir="${shib.home}/etc" />
         <copy todir="${shib.home}/etc" overwrite="true">
             <fileset dir="${src}/conf" />
         <replace file="${shib.home}/etc/idp.xml" token="$SHIB_HOME$" value="${shib.home}" />
     </target>
 
-    <target name="install.idp.manager">
+       <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}" />