Deploying war file into managed weblogic server to

2019-05-07 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>

标签: ant weblogic
4条回答
萌系小妹纸
2楼-- · 2019-05-07 12:54

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

查看更多
Luminary・发光体
3楼-- · 2019-05-07 12:55

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楼-- · 2019-05-07 12:59

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

查看更多
地球回转人心会变
5楼-- · 2019-05-07 13:02

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

查看更多
登录 后发表回答