Deploying war file into managed weblogic server to the given path location

跟風遠走 提交于 2019-12-07 08:12:37

问题


I am using the Ant wldeploy task to deploy a war file. It is working fine, but the war file path in the deployed server is set to something like

servers/myadminservername/upload/mywarfilename/app

Instead, I would like to set this path myself in the Ant buildfile.

Can any one please help me with that?

The task I am using for this is:

<wldeploy action="deploy" verbose="false" debug="true"
          name="ClientProfileSyncPortTypeImplV8"            
          source="${results.war.file.dir}/ClientProfileSyncPortTypeImplV8.war"
          upload="true" adminurl="t3://${serverip}:${port}"
          user="${admin_id}"
          password="${admin_pw}"
          usenonexclusivelock="${lock}"
          targets="${target_managed1}">
</wldeploy>

回答1:


I think you can edit the config.xml and specify the path of your deployment.




回答2:


The upload, targets and stage / nostage / externalstage attributes of the wldeploy task give some control over where the deployment is made to.




回答3:


I ended up deleting the app and the deploying it from ant, accepting the path it chooses. Now I can deploy and redeploy just fine. It's really neither here nor there to me where the ear lives - I was just sad that when I deployed in the UI I couldn't redeploy using ant.




回答4:


I know this is an old post but I have a partial solution for anyone who stumbles across this question

From the path: "domain/servers/myadminservername/upload/mywarfilename/app" you can change the first part of this (You can edit the "servers/myadminservername/upload") to go to any directory relative to the WLS domain.

Go to the Administrator Console (using: serverIP:serverPort/console) and in the left hand side follow the tree: environment -> servers -> (AdminServerName) -> Configuration -> Deployment -> Upload Directory Name

The "Upload Directory Name" can contain a path to a directory that is relative to the domain.

So at least "domain/servers/myadminservername/upload/mywarfilename/app" can become "domain/path_of_your_choice/mywarfilename/app"

Hope this helps someone



来源:https://stackoverflow.com/questions/4562406/deploying-war-file-into-managed-weblogic-server-to-the-given-path-location

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