| |
Ant deployment to OC4J
Ant deployment to OC4J
Deploying to an OC4J standalone instance from an Ant script is
quite easy to do, and I'm sure many people have got it nutted
out. I always tend to forget the syntax and have to scrounge
through old build files to grab the exact format of the command. So for
ease-of-use, I am putting up here the Ant targets I use to perform
deployment operations from Ant scripts
EAR file deployment:
<target name="deploy" depends="core">
<java jar="${j2ee.home}/admin.jar" fork="yes">
<arg value="${oc4j.deploy.ormi}"/>
<arg value="${oc4j.deploy.username}"/>
<arg value="${oc4j.deploy.password}"/>
<arg value="-deploy"/>
<arg value="-file"/>
<arg value="${this.build}/${this.ear}"/>
<arg value="-deploymentName"/>
<arg value="${this.application.name}"/>
</java>
</target>
Web application binding:
<target name="bind-web-app" depends="deploy">
<java jar="${j2ee.home}/admin.jar" fork="yes">
<arg value="${oc4j.deploy.ormi}"/>
<arg value="${oc4j.deploy.username}"/>
<arg value="${oc4j.deploy.password}"/>
<arg value="-bindWebApp"/>
<arg value="${this.application.name}"/>
<arg value="${this.war}"/>
<arg value="http-web-site"/>
<arg value="/${this.uri}"/>
</java>
</target>
Undeployment:
<target name="undeploy" depends="init">
<java jar="${j2ee.home}/admin.jar" fork="yes">
<arg value="${oc4j.deploy.ormi}"/>
<arg value="${oc4j.deploy.username}"/>
<arg value="${oc4j.deploy.password}"/>
<arg value="-undeploy"/>
<arg value="${this.application.name}"/>
</java>
</target>
Chuck them into your build file, set the corresponding properties and that should do it for you.
© Copyright 2004 buttso.
Last update: 3/16/2004; 12:23:58 PM.
|
|