Date Created: Tue 22-Jan-2008

Related Document Categories:


    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>

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