7. Build web application – SOMU_webApp.war

Mirjana's picture

    • 1st way - build.xml ant script, in eclipse, that will build a war file


<project name="ServiceSDK" default="dist" basedir=".">
      <property name="srcdir" value="../src" />
      <property name="application" value="SOMU_webApp" />
      <property name="version" value="1.0" />
      <property name="classpath" value="../WebContent/WEB-INF/lib" />
      <target name="compile">
            <echo message="Make dir ..."/>
            <mkdir dir="../WebContent/WEB-INF/classes"/>
            <echo message="Compile class ..."/>
            <javac classpath="${classpath}" srcdir="${srcdir}" destdir="../WebContent/WEB-INF/classes" />
      <target name="dist" depends="compile">
            <echo message="Compile and package jar ..."/>
            <jar destfile="./${application}.war" basedir="../WebContent" />


  • 2nd way - batch script that can build the war file


set PATH=%PATH%;C:\j2sdk1.4.2_12\bin
jar cvf SOMU_webApp.war *


  • Move .war file to SI server


When .war file is created, you can copy it to SI server, at any place thatcan be accesible from SI installation