This documents the complete range of options available when deploying OGSA-DAI.
To build a WAR file run:
$ ant buildWAR \ [-Ddai.war=LOCATION-OF-BUILT-WAR] \ Default: build/dai.war [-Ddai.host=HOST] \ Default: localhost [-Ddai.port=PORT] Default: 8080
To deploy a WAR file onto Tomcat run:
$ ant deployWAR -Dtomcat.dir=/PATH/TO/TOMCAT \ [-Ddai.war=LOCATION-OF-BUILT-WAR] Default: build/dai.war
The WAR file will be deployed into Tomcat. The WAR file prefix (e.g.
dai determines the name of the
webapp used by Tomcat). This should be borne in mind if renaming WAR
files
![]() | Caution |
|---|---|
| If you rename a WAR file then references to the webapp within files in the WAR file, e.g. schema files, will become out of synch, so best not to bother! |
To deploy OGSA-DAI Axis services, once an OGSA-DAI Axis WAR file has been deployed and Tomcat is running, run:
$ ant deployServices -Dtomcat.dir=/PATH/TO/TOMCAT \ [-Ddai.host=HOST] \ Default: localhost [-Ddai.port=PORT] \ Default: 8080 [-Ddai.webapp=WEBAPP] \ Default: dai [-Ddai.dres.service.name=DRES-SERVICE] \ Default: DataRequestExecutionService [-Ddai.dris.service.name=DRIS-SERVICE] \ Default: DataResourceInformationService [-Ddai.dsos.service.name=DSOS-SERVICE-NAME] \ Default: DataSourceService [-Ddai.dsis.service.name=DSIS-SERVICE-NAME] \ Default: DataSinkService [-Ddai.sms.service.name-SMS-SERVICE-NAME] \ Default: SessionManagementService [-Ddai.rms.service.name=RMS-SERVICE-NAME] Default: RequestManagementService
SERVICE-NAME
results, after deployment, in a service with URL:
http://HOST:PORT/WEBAPP/services/SERVICE-NAME
To deploy a WAR file and services onto Tomcat then, provided Tomcat is running, run:
$ ant deployWARAndServices
This command just invokes the
deployWAR and
deployServices commands so the
command-line options are as for these two commands.
To build and deploy a WAR file and services onto Tomcat, provided Tomcat is running, run:
$ ant buildDeployWARAndServices
This command just invokes the
buildWAR and
deployWARAndServices commands so the
command-line options are as for these two commands.
To summarize, there are three possible deployment approaches:
When running, Tomcat auto-unpacks WAR files.
deployOnStartup setting
is true.
unpackWAR setting
is true (default if not specified).
web.xml file is updated
or there is a newer WAR then the WAR is redeployed.
For Tomcat 4 - you need to use the Tomcat Manager to deploy/undeploy WARs when Tomcat is running.
The Tomcat Manager username and password can be set in
/PATH/TO/TOMCAT/conf/tomcat-users.xml.
For example:
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <user name="mike" password="zonk" roles="standard, manager" /> </tomcat-users>
The Tomcat Manager is accessed via a running Tomcat instance and then accessing the Tomcat front page using an internet browser or by using Tomcat ANT commands - the Tomcat user doc contsins information on this.
Placing a META-INF/Context.xml in a
WAR file allows access to and changes to the
/PATH/TO/TOMCAT/conf/server.xml
file. This is required when making use of Tomcat JNDI for example.
Useful links: