Date Created: Wed 16-Feb-2011

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/



    ws_ant examples ...


    <?xml version="1.0" encoding="UTF-8"?>

    <project name="LogViewEAR Application Depoyment" default="build-all" basedir=".">
    <!-- global properties -->
    <property name="hostName" value="localhost" />
    <property name="connType" value="SOAP" />
    <property name="port" value="8880" />
    <property name="userId" value="wasadmin" />
    <property name="password" value="wasadmin" />
    <property name="deployEar.dir" value="c:/temp/antbuild/dist" />
    <property name="warFile" value="logViewWAR.war" />
    <property name="appName" value="LogView" />
    <property name="earFile" value="logViewEAR.ear" />
    <property name="wasHome.dir" value="c:/was7/appserver" />

    <!-- mbean declarations" -->
    <taskdef name="wsUninstallApp" classname="com.ibm.websphere.ant.tasks.UninstallApplication" />
    <taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication" />
    <taskdef name="wsListApplications" classname="com.ibm.websphere.ant.tasks.ListApplications" />

    <!-- installation Target-->
    <target name="installEarBasic">
    <wsInstallApp
    ear="${deployEar.dir}/${earFile}"
    options="-appname ${appName} -usedefaultbindings"
    wasHome="${wasHome.dir}"
    conntype="${connType}"
    port="${port}"
    host="${hostName}"
    user="${userId}"
    password="${password}" />

    </target>

    <!-- List Target-->
    <target name="listApplications">
    <wsListApplications
    wasHome="${wasHome.dir}"
    conntype="${connType}"
    port="${port}"
    host="${hostName}"
    user="${userId}"
    password="${password}" />
    </target>

    <!-- Uninstall Target-->
    <target name="uninstallEAR">
    <wsUninstallApp application="${appName}"
    wasHome="${wasHome.dir}"
    conntype="${connType}"
    port="${port}"
    host="${hostName}"
    user="${userId}"
    password="${password}" />
    </target>

    <!-- installation Target-->
    <target name="installEAR">
    <echo message="Deployable EAR File found at: ${deployEar.dir}/${deployEar}" />
    <wsInstallApp ear="${deployEar.dir}/${deployEar}"
    options="-appname ${appName}"
    wasHome="${wasHome.dir}"
    conntype="${connType}"
    port="${port}"
    host="${hostName}"
    user="${userId}"
    password="${password}" />
    </target>

    <target name="build-all" depends="listApplications, uninstallEAR, listApplications, installEAR, listApplications">
    <!--Main Target-->
    </target>

    </project>

    Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories