Hi Jeff,
This webpage explains how to deploy to OC4J using Ant, its pretty simple:
http://radio.weblogs.com/0132383/stories/2004/03/16/antDeploymentToOc4j.html
I've included some of my build.xml targets below as well. You'll note
that the OC4J targets are slightly different from IAS, so depending on
your server, you will need to use one or the other. (We run OC4J on
dev machines and IAS on real servers.)
And of course you need a build.properties file with your
environment-specific deployment settings ie:
oc4j.host=localhost
oc4j.ormi.port=23791
oc4j.admin=admin
oc4j.admin.password=admin
oc4j.web.site=http-web-site
Wayne
<target name="oc4jDeploy" depends="oc4jUndeploy">
<java jar="${basedir}/lib/jdev/j2ee/home/admin.jar" fork="true"
failonerror="true">
<arg value="ormi://${oc4j.host}:${oc4j.ormi.port}/"/>
<arg value="${oc4j.admin}"/>
<arg value="${oc4j.admin.password}"/>
<arg value="-deploy"/>
<arg value="-file"/>
<arg value="${basedir}/Ear/target/ear-2.1.2.ear"/>
<arg value="-deploymentName"/>
<arg value="XYZ"/>
</java>
<java jar="${basedir}/lib/jdev/j2ee/home/admin.jar" fork="true"
failonerror="true">
<arg value="ormi://${oc4j.host}:${oc4j.ormi.port}/"/>
<arg value="${oc4j.admin}"/>
<arg value="${oc4j.admin.password}"/>
<arg value="-bindWebApp"/>
<arg value="XYZ"/>
<arg value="web-2.1.2"/>
<arg value="${oc4j.web.site}"/>
<arg value="${oc4j.web.context}"/>
</java>
</target>
<target name="oc4jUndeploy" depends="">
<java jar="${basedir}/lib/jdev/j2ee/home/admin.jar" fork="true"
failonerror="true">
<arg value="ormi://${oc4j.host}:${oc4j.ormi.port}/"/>
<arg value="${oc4j.admin}"/>
<arg value="${oc4j.admin.password}"/>
<arg value="-undeploy"/>
<arg value="XYZ"/>
</java>
</target>
<target name="iasDeploy" depends="iasUndeploy">
<java jar="${basedir}/lib/jdev/jdev/lib/oc4j_remote_deploy.jar" fork="true">
<arg value="http://${ias.host}:${ias.em.port}/${ias.dcmservlet}/"/>
<arg value="${ias.admin}"/>
<arg value="${ias.admin.password}"/>
<arg value="redeploy"/>
<arg value="${ias.oracle.home}"/>
<arg value="${basedir}/Ear/target/ear-2.1.2.ear"/>
<arg value="XYZ"/>
<arg value="${ias.oc4j.instance}"/>
</java>
</target>
<target name="iasUndeploy" depends="">
<java jar="${basedir}/lib/jdev/jdev/lib/oc4j_remote_deploy.jar" fork="true">
<arg value="http://${ias.host}:${ias.em.port}/${ias.dcmservlet}/"/>
<arg value="${ias.admin}"/>
<arg value="${ias.admin.password}"/>
<arg value="undeploy"/>
<arg value="${ias.oracle.home}"/>
<arg value="XYZ"/>
<arg value="${ias.oc4j.instance}"/>
</java>
</target>
On 3/14/06, Jeff Mutonho <[EMAIL PROTECTED]> wrote:
>
>
>
> On 3/14/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > No, we are deploying with ant script which just calls the oc4j
> > admin.jar to deploy and then bindWebApp...
> >
> > You could probably deploy with Cargo, but I just didn't have the
> > patience or time to get it working yet. Too busy with real work, and
> > the ant scripts are fine for now, no particular reason to force the
> > change...
> >
> > Wayne
>
>
> Wayne , I'm pretty new to deployment wrt Oracle .I have Websphere experience
> though.Do you mind giving me a snippet of how your ant script looks
> like?Thanx
>
>
>
> > On 3/14/06, Jeff Mutonho <[EMAIL PROTECTED] > wrote:
> > > On 3/14/06, Alexandre Poitras <[EMAIL PROTECTED]> wrote:
> > > >
> > > > One thing to note : JSTL jars are not included in the 10.1.3 version
> > > > so you need to modify a little bit your pom file.
> > > >
> > > > On 3/13/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> > > > > I'm deploying to oc4j 10.1.2 with no issues. Tried 10.1.3 briefly
> but
> > > > > broke a bunch of things and I'm not inspired to change them since
> our
> > > > > Production environment is 10.1.2 for the immediate future. Sounds
> like
> > > > > the JDev approach mentioned by Alexandre would help resolve some of
> > > > > these troubles, if you're moving to 10.1.3.
> > > > >
> > > > > Wayne
> > > > >
> > > > >
> > > > > On 3/13/06, Alexandre Poitras <[EMAIL PROTECTED]> wrote:
> > > > > > We have done it without any problems. By te way, for our migration
> to
> > > > > > Oc4j 10.1.3, we have used the Jdeveloper plugin found in the
> > > > > > preliminary adf faces drop to convert our old projects, everything
> > > > > > worked great, even better then using the default conversion in
> > > > > > JDeveloper wich has some issues :)
> > > > > >
> > > > > > On 3/13/06, Jeff Mutonho <[EMAIL PROTECTED]> wrote:
> > > > > > > Anyone building ear or war files to deploy on the 10G
> appserver?Have
> > > > you
> > > > > > > experienced any problems?What should I look out for?
> > > > > > > Pointers,etc...?
> > > > > > >
> > > >
> > >
> > > Wayne , are you using hot deployment .ie merely copying the ear or war
> > > file to the right directory and letting oc4j 10.1.2 take care of things?
> > >
> > > --
> > > Jeff GoogleTalk : ejbengine
> > > Skype : ejbengine
> > > Registered Linux user number 366042
> > >
> > >
> >
>
>
>
>
> --
> Jeff Mutonho
> Java/J2EE Developer
> ph : + 27 21 408 6230
> mob : + 27 82 907 6420
>
>
> GoogleTalk : ejbengine
> Skype : ejbengine
> Registered Linux user number 366042