Question : How to undeploy and deploy a war file in weblogic using Ant script

Hi,

Can anybody help me with is ?

The deploy should be on a managed server

Answer : How to undeploy and deploy a war file in weblogic using Ant script

ensure to run setDomainEnv.sh/setDomainEnv.cmd which is located in bin directory of your domain.

Create a build.xml file which will have the follwoing targets.



 
          action="deploy" verbose="true" debug="true"
      name="DeployExample" source="output/redeployEAR"
      user="weblogic" password="weblogic"
      adminurl="t3://localhost:7001" targets="myserver" />
 


 
          action="undeploy" verbose="true" debug="true"
      name="DeployExample"
      user="weblogic" password="weblogic"
      adminurl="t3://localhost:7001" targets="myserver"
      failonerror="false" />
 



Now you can run, "ant deploy" or "ant undeploy"

Note that "myserver" mentioned about can be replaced with your cluster name or managed server name (according to your needs).


Refer http://e-docs.bea.com/wls/docs90/programming/wldeploy.html#1000506 for more details
Random Solutions  
 
programming4us programming4us