How to remote deploy an application in weblogic?

我与影子孤独终老i 提交于 2019-12-04 20:31:57

问题


I have two computers , I don't want to install weblogic and oracle in my development computer, they consume too much memory, the problem is how can I deploy my application on development computer to another free computer which has oracle and weblogic installed ? I am using weblogic 10.3.


回答1:


I don't want to install weblogic and oracle in my development computer , they consume too much memory

Even when not running?

how can I deploy my application from my development machine to another machine which has oracle and weblogic installed

You can use the following tools:

  • webLogic.Deployer (see the weblogic.Deployer Command Line Reference)
  • Admin Console
  • wldeploy, the Ant Task version of the weblogic.Deployer (see the wldeploy Ant Task Reference)
  • WLST (see Deploying Applications in the WebLogic Scripting Tool documentation).

Other options (if you are using maven):

  • weblogic maven plugin (no feedback to give you except that I wouldn't use it)
  • cargo maven plugin (doesn't support deployment to remote weblogic)



回答2:


If you use the Ant Task, then be sure and include the upload="true" parameter. This will copy the war, ear file to the remote weblogic system so you don't have to.




回答3:


Wldeploy works like a charm. The configuration looks like this.

    <target name="deploy">
        <wl.deploy.app archivepath="${ear.path}" name="${ear.deployment.name}"
                   wladminuser="${weblogic.admin.user}" wlserverhost="${weblogic.server.host}"
                   wlserverport="${weblogic.server.port}" wlservername="${test.server.name}"
                   wladminpassword="${weblogic.admin.password}"/>
    </target>
    <macrodef name="wl.deploy.app">
     <attribute name="archivepath"/>
     <attribute name="name"/>
     <attribute name="wladminuser"/>
     <attribute name="wladminpassword"/>
     <attribute name="wlserverhost"/>
     <attribute name="wlserverport"/>
     <attribute name="wlservername"/>
     <attribute name="sharedlibrary" default="false"/>

     <sequential>
        <wldeploy action="deploy" verbose="true" debug="true"
                  name="@{name}"
                  library="@{sharedlibrary}"
                  remote="true"
                  upload="true"
                  source="@{archivepath}"
                  user="@{wladminuser}" password="@{wladminpassword}"
                  adminurl="t3://@{wlserverhost}:@{wlserverport}"
                  targets="@{wlservername}"/>
     </sequential>
 </macrodef>

Just specify all the properties correctly be it localhost or a remote machine. It should work.



来源:https://stackoverflow.com/questions/2131687/how-to-remote-deploy-an-application-in-weblogic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!