Wednesday, May 30, 2012

ANT script to deploy application

Create a file called Build.xml and below are its contents:
...............................................................................................................................................
<project name="Test Deployment" default="deploy">
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<classpath>
<pathelement location="D:/work/wls/wls9.2.4/weblogic92/server/lib/weblogic.jar"/>
</classpath>
</taskdef>
<target name="deploy">
<wldeploy
        action="deploy" verbose="true" debug="true" upload="true" remote="true" stage="true" library="true"
        name="conference.shared.lib" source="C:\test\test.war"
        user="weblogic" password="weblogic"
        adminurl="t3://localhost:7001" targets="examplesServer" />
</target>
</project>
...............................................................................................................................................
# change the appropriate values to reflect your environment.

Start the weblogic server.
Run the setdomainenv.sh from the domain folder and then traverse to the file containing build.xml
and type $ ant
This will deploy the file.

2 comments:

Anonymous said...

I am not able to deploy to weblogic,can you help me,below is my ant script.

Starting EAR Deploy.










Ending EAR Deploy.

and below is the logs





















Blogger said...

BlueHost is the best website hosting provider for any hosting services you require.