Date Created: Thu 02-Dec-2010

Related Document Categories:

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


    Validating an EAR file using ws_ant. Validated as working on 24-April-2007

    Local installation was Websphere for devlopers 6.1. I create a new profile called AppSrv01 with a server call server1, with the development mode turned on to speed up starting.

    I then copied into the c:\61websphere\profiles\appsrv01\bin directory the follwing ANT xml file.


    validateapp.xml

    commandline to run

    open a DOS prompt to c:\61websphere\profiles\appsrv01\bin then run ws_ant -f validateapp.xml

    -------------------- validateapp.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="hostname"/>
    <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="8880"/>
    <property name="mailHostName" value="mail.domain.com"/>



    <!--<tstamp>
    <format property="NOW" pattern="yyyy-MM-dd-HH-mm"/>
    </tstamp>-->

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

    <property name="ear.dir" value="D:/workspace/java/jsfks/deploy"/>
    <property name="ear.file" 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="wsValidateModule"
    classname="com.ibm.websphere.ant.tasks.ModuleValidator"
    classpathref="ws.classpath"/>
    </target>

    <target name="validate.app" depends="ws.task"
    description="Validate application">
    <wsValidateModule src="${ear.dir}/${ear.file}"/>
    </target>

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

Other Categories