Changeset 3167

Show
Ignore:
Timestamp:
02/10/11 11:19:18
Author:
douglm
Message:

Support multiple virtual hosts as a comma-separated list

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/platforms/jbossWar.xml

    r3148 r3167  
    2424      <isset property="propval.app.virtual.host" /> 
    2525      <then> 
    26         <replace file="${app.dest.webinf}/jboss-web.xml"> 
    27           <replacetoken><![CDATA[<!-- Virtual host -->]]></replacetoken> 
    28           <replacevalue><![CDATA[<virtual-host>@VIRTUAL-HOST@</virtual-host> 
    29           ]]> 
    30           </replacevalue> 
    31         </replace> 
    32         <replace file="${app.dest.webinf}/jboss-web.xml"> 
    33           <replacefilter token="@VIRTUAL-HOST@" value="${propval.app.virtual.host}"/> 
    34         </replace> 
    35       </then> 
    36     </if> 
     26        <foreach list="${propval.app.virtual.host}" 
     27                 target="setVirtualHost" 
     28                 param="org.bedework.virtual.host.name" 
     29                 inheritall="true" 
     30                 inheritrefs="true" 
     31                 trim="true" /> 
     32      </then> 
     33    </if> 
     34  </target> 
     35   
     36  <target name="setVirtualHost"> 
     37    <replace file="${app.dest.webinf}/jboss-web.xml"> 
     38      <replacetoken><![CDATA[<!-- Virtual host -->]]></replacetoken> 
     39      <replacevalue><![CDATA[<!-- Virtual host --> 
     40        <virtual-host>@VIRTUAL-HOST@</virtual-host> 
     41      ]]> 
     42      </replacevalue> 
     43    </replace> 
     44    <replace file="${app.dest.webinf}/jboss-web.xml"> 
     45      <replacefilter token="@VIRTUAL-HOST@" value="${org.bedework.virtual.host.name}"/> 
     46    </replace> 
    3747  </target> 
    3848