Steps:
1. Call <<bea_home>>\weblogic92\server\bin\startWLS.cmd to set weblogic specific env details
2. Create a file build.properties and add below details
deploy.name=ApplicationName deploy.source=Application.war wls.hostname=127.0.0.1 wls.port=7001 wls.username=weblogic wls.password=weblogic deploy.target=AdminServer |
3. Create a file build.xml as shown below
<?xml version="1.0" encoding="UTF-8"?> <project default="deploy" name="Test"> <!-- These targets added to control wls deploy, undeploy & redploy from ant tool --> <taskdef name="wlserver" classname="weblogic.ant.taskdefs.management.WLServer"> <classpath> <pathelement location="${wl.home}/lib/weblogic.jar" /> </classpath> </taskdef> <!-- Deploying Applications --> <target name="deploy"> <wldeploy debug="true" action="deploy" name="${deploy.name}" source="${deploy.source}" user="${wls.username}" nostage="true" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" /> </target> <!-- Redeploying Applications --> <target name="redeploy"> <wldeploy action="redeploy" name="${deploy.name}" user="${wls.username}" nostage="false" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}"/> </target> <!-- Uneploying Applications --> <target name="undeploy"> <wldeploy action="undeploy" name="${deploy.name}" failonerror="false" user="${wls.username}" password="${wls.password}" verbose="true" adminurl="t3://${wls.hostname}:${wls.port}" targets="${deploy.target}" /> </target> </project> |
4. Run <<ant_home>>\bin\ant deploy
No comments:
Post a Comment