Date Created: Sun 08-Mar-2009

Related Document Categories:


    ws_ant script to install an application into WebSphere.


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

    <project name="My Application Deployment" default="build-all" basedir=".">

    <!-- ===================================================================== -->
    <!-- define global properties -->
    <!-- ===================================================================== -->

    <property name="remoteHostName" value="localhost" />
    <property name="remoteConnType" value="SOAP" />
    <property name="remotePort" value="8880" />
    <property name="remoteUserId" value="wasadmin" />
    <property name="remotePassword" value="wasadmin" />

    <!-- change this to your local installation, if different -->

    <property name="deployEar.dir" value="/staging/deployments" />
    <property name="deployEar" value="myEAR.ear" />

    <!-- change this to your local installation, if different -->

    <property name="wasHome.dir" value="/apps/was7" />

    <taskdef name="wsInstallApp" classname="com.ibm.websphere.ant.tasks.InstallApplication" />
    <!--
    <wsInstallApp
    wasHome="location of websphere installation"
    ear="the ear file you wish to install"
    options="the options to pass to the installation process"
    properties="java properties file containing attributes to set in the JVM System properties"
    profile="a script file to be executed before the main command or file"
    profileName="the profile name of the desired server"
    conntype="specifies the type of connection to be used."
    host="the host to connect to"
    port="the port on the host to connect to"
    user="user ID to authenticate with"
    password="password to authenticate with"
    failonerror="true | false"/>
    -->
    <target name="installEar">
    <echo message="EAR File located: ${deployEar.dir}/${deployEar}" />
    <wsInstallApp ear="${deployEar.dir}/${deployEar}" wasHome="${wasHome.dir}" conntype="${remoteConnType}" host="${remoteHostName}" user="${remoteUserId}" password="${remotePassword}" />
    </target>

    <target name="build-all" depends="installEar">

    </target>

    </project>

Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

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