[SIDP-404] - Add an install-time setting for the path to web.xml
authorrdw <rdw@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 8 Feb 2011 14:25:24 +0000 (14:25 +0000)
committerrdw <rdw@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 8 Feb 2011 14:25:24 +0000 (14:25 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2988 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

doc/RELEASE-NOTES.txt
src/installer/resources/build.xml

index 739aaa4..bcc584d 100644 (file)
@@ -2,6 +2,7 @@ Changes in Release 2.3.0
 =============================================
 [SIDP-429] - Limit metadata SP credential resolution for encryption to RSA keys only
 [SIDP-272] - Regenerate self-signed certificate with installer task
+[SIDP-404] - Add an install-time setting for the path to web.xml
 
 Changes in Release 2.2.1
 =============================================
index 43856a9..ad1a7b6 100755 (executable)
@@ -72,6 +72,7 @@
                 <mkdir dir="${idp.home.path}/war" />
 
                 <var name="idp.entity.id" value="https://${idp.hostname}/idp/shibboleth" />
+                <var name="idp.web.xml.name" value="${webapp.dir}/WEB-INF/web.xml" />
 
                 <regexSplit input="${idp.hostname}" regex="^.*\.(.*\..*$)" addproperty="idp.scope" />
 
                     <entry key="idp.home" value="${idp.home.input}" />
                 </propertyfile>
                
+                <if> 
+                    <available file="${idp.home.path}/conf/web.xml" property="idp.web.xml.exists"/>
+                    <then>
+                        <echo message="Using ${idp.home.path}/conf/web.xml rather than default web.xml"/>
+                        <var name="idp.web.xml.name" value="${idp.home.path}/conf/web.xml" />
+                    </then>
+                    <else>
+                        <var name="idp.web.xml.name" value="${webapp.dir}/WEB-INF/web.xml" />
+                    </else>
+                </if>
+
                 <!-- 
                     Even if we're not overwritting the config we should still add new files, for example, files added
                     in a new release.
         </copy>
 
         <!-- create web.xml -->
-        <copy file="${webapp.dir}/WEB-INF/web.xml"
+        <copy file="${idp.web.xml.name}"
               todir="${installer.dir}"
               preservelastmodified="true"
               overwrite="true">