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>
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
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.
The
upload
,targets
andstage
/nostage
/externalstage
attributes of the wldeploy task give some control over where the deployment is made to.I think you can edit the config.xml and specify the path of your deployment.