开发者

Eclipse + remote OC4J server - deploying application

开发者 https://www.devze.com 2022-12-10 03:54 出处:网络
I w开发者_JAVA技巧ould like to deploy web application on a remote OC4J server using Eclipse. Is it possible? I\'m using WTP and when adding the OC4J server there is only localhost available.Here\'s an

I w开发者_JAVA技巧ould like to deploy web application on a remote OC4J server using Eclipse. Is it possible? I'm using WTP and when adding the OC4J server there is only localhost available.


Here's an ant task to deploy to OC4J. Just define the variables in build.properties and execute this from Eclipse. You can also execute it from command line. This will work on a standalone oc4j and with some modifications on the Application Server.

<target name="deploy"
     description="deploy enterprise archive">
     <java classname="${oc4j_home}/j2ee/home/admin_client.jar>
      <jvmarg value="-jar"/>
      <arg value="deployer:oc4j:opmn://${oc4j_host}:${oc4j_rmiport}/${oc4j_name}"/>
      <arg value="${oc4j_admin}"/>
      <arg value="${oc4j_admin_password}"/>
      <arg value="-deploy"/>
      <arg value="-file"/>
      <arg value="${application.ear}"/>
      <arg value="-deploymentName"/>
      <arg value="${application_name}"/>
     </java>
     <!-- bind the web app -->
     <java classname="${oc4j_home}/j2ee/home/admin_client.jar">
      <jvmarg value="-jar"/>
      <arg value="deployer:oc4j:opmn://${oc4j_host}:${oc4j_rmiport}/${oc4j_name}"/>
      <arg value="${oc4j_admin}"/>
      <arg value="${oc4j_admin_password}"/>
      <arg value="-bindWebApp"/>
      <arg value="-appName"/>
      <arg value="${application_name}"/>
      <arg value="-webModuleName"/>
      <arg value="${webmodule_name}"/>
     </java>
</target>


One way to deploy from Eclipse is creating an Ant build to do it, calling admin_client.jar option to deploy.

0

精彩评论

暂无评论...
验证码 换一张
取 消