The out-of-the-box plugin doesn't do it, but it's possible to add rudimentary support for it by editing a few of the plugins XML files.
You'll find the latest version of the plugin in the following directory: eclipse\plugins\org.eclipse.jst.server.generic.oc4j_1.5.0.v200606130315
What we need is to specify somewhere what the "parent" of the application being deployed is.
One way to do this is to edit oracle.10.1.3.serverdef file and add an additional property field that is shown in the server configuration dialog:
<property id="application.parent"This addition results in the new property appearing on the OC4J server definition page:
label="Parent Application:"
type="string"
context="server"
default="default" />
The "Parent Application" property specified on the server defintion is then passed through to the Ant build file that performs the deployment.
Now by simply editing the oracle.10.1.3.xml file (which contains the deployment targets that are called by the plugin) the appplication.parent property can be appended to the deployment operation:
<target name="deploy.j2ee.ear" depends="check.skip.ear.deploy" unless="skip.deploy">Now when a deployment is performed using this OC4J server definition, the parent property of the deployed application will be set to the value specified as shown in this snippet from the oc4j server.xml configuration file.
<antcall target="package.module.ear"/>
<oracle:deploy
deployerUri="${deployer.uri}"
userId="${oc4j.admin.user}"
password="${oc4j.admin.password}"
file="${server.publish.dir}/${module.name}.ear"
deploymentName="${module.name}"
bindAllWebApps="${oc4j.bind.website}"
parent="${application.parent}"/>
</target>
<application name="otn-parent-deploy-ear"Its not the perfect solution since the parent value is specified at an OC4J server definition level and you can't specify the parent on an application-by-application basis. Which effectively means if you need to have different parent applications, you effecitvely need to create an OC4J server definition for each parent setting you need.
path="../applications\otn-parent-deploy-ear.ear"
parent="default" start="true" /
>
But if for some reason you really need to specify a specific parent value when deploying using the Eclipse WTP OC4J plugin, this is one way to accomodate it.