Changeset 26033 for main


Ignore:
Timestamp:
2012-07-27T18:04:42+12:00 (12 years ago)
Author:
ak19
Message:

OAIConfig.xml's baseURL property is now set dynamically to the OAIServer URL whenever the tomcat server has started up.

Location:
main/trunk/greenstone3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r26002 r26033  
    644644    <echo>URL   : ${url}</echo>
    645645    <!-- assuming that index.html is not needed here -->   
     646
     647    <!--Now write out the url with oaiserver suffix as the baseURL property in OAIConfig.xml-->
     648    <available file="${web.classes}/OAIConfig.xml" property="oaiconfig.present"/>
     649    <antcall target="init-oaiconfig">
     650      <param name="url" value="${url}"/>
     651    </antcall>
     652  </target>
     653
     654  <target name="init-oaiconfig" if="oaiconfig.present">
     655    <echo>Writing out baseURL ${url}oaiserver to ${web.classes}/OAIConfig.xml</echo>
     656    <rsr file="${web.classes}/OAIConfig.xml" pattern="&lt;baseURL&gt;.*&lt;/baseURL&gt;" replacement="&lt;baseURL&gt;${url}oaiserver&lt;/baseURL&gt;" />   
    646657  </target>
    647658
  • main/trunk/greenstone3/web/WEB-INF/classes/OAIConfig.xml

    r21792 r26033  
    66  <repositoryName>Greenstone3 OAI repository</repositoryName>
    77  <!-- The base url to request metadata from this repository.
    8   TODO: this element should be determined and overriden dynamically given the osi request url in OAIServer.java. -->
     8  TODO: this element should be determined and overriden dynamically given the osi request url in OAIServer.java.
     9    WHAT'S DONE: when ant start is called, it writes out the default oaiserver URL to this file. -->
    910  <baseURL>http://your-domain-name/greenstone3/oaiserver</baseURL>
    1011  <!-- The version of OAI specification this repository supports. Can be 2.0 or 1.0 -->
Note: See TracChangeset for help on using the changeset viewer.