Date Created: Tue 22-Jan-2008

Related Document Categories:


    A sample ant build file to show server status


    serverstatus.xml



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

    <project name="Deploy" default="build-all" basedir=".">

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

    <property name="remoteAppName" value="ivtApp"/>
    <property name="remoteHostName" value="localhost"/>
    <property name="remoteServerName" value="server1"/>
    <property name="remoteConnType" value="SOAP"/>
    <property name="remoteUserId" value="websphereadmin"/>
    <property name="remotePassword" value="W385phere@dm1n"/>
    <property name="remotePort" value="8881"/>
    <property name="mailHostName" value="mail.domain.com"/>
    <property name="profileName" value="AppSrv02"/>

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

    <property name="existingEar.dir" value="D:\workspace\java\jsfks\deploy"/>
    <property name="existingEar" value="jsfks.ear"/>

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

    <property name="ws.home.dir" value="c:/61websphere"/>
    <property name="user.install.root" location="${ws.home.dir}"/>

    <path id="ws.classpath">
    <fileset dir="${ws.home.dir}/lib" includes="**/*.jar" />
    </path>

    <target name="ws.task">
    <taskdef name="wsServerStatus"
    classname="com.ibm.websphere.ant.tasks.ServerStatus"
    classpathref="ws.classpath"/>
    </target>
    <!--
    <wsServerStatus
    server="name of the server to get status on"
    quiet="true | <b>false</b>"
    trace="true | <b>false</b>"
    all="true | <b>false</b>"
    cell="name of the WebSphere Cell containing the server"
    node="name of the WebSphere Node containing the server"
    timeout="amount of time to wait for the server status"
    statusPort="port for the server to send status messages to"
    wasHome="WebSphere Installation directory"
    failonerror="true | <b>false</b>"/>

    -->
    <target name="ServerStatus" depends="ws.task">
    <wsServerStatus
    server="${remoteServerName}"/>
    </target>

    <target name="build-all" depends="ServerStatus">
    </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