blob: 3b14d99aaef3e834ef44178ed66a5148eb9d0df6 [file] [log] [blame]
<project basedir="../" default="create.war">
<property name="dist" value="dist" />
<property name="temp" value="${dist}/temp" />
<target name="init">
<mkdir dir="${dist}" />
<mkdir dir="${temp}" />
<copy toDir="${temp}">
<fileset dir="webapp">
<include name="**/**" />
<exclude name="**/web.xml"/>
</fileset>
</copy>
</target>
<target depends="init" name="prepare.repo">
<!-- Copying the axis2 repository from ../repository -->
<copy toDir="${temp}/WEB-INF">
<fileset dir="repository">
<include name="**/**" />
</fileset>
</copy>
<!-- Creating the services.list -->
<path id="services.archives">
<fileset dir="${temp}/WEB-INF/services">
<include name="*.aar" />
</fileset>
</path>
<pathconvert pathsep="${line.separator}" property="echo.services.archives" refid="services.archives">
<flattenmapper />
</pathconvert>
<echo file="${temp}/WEB-INF/services/services.list" message="${echo.services.archives}" />
<!-- Creating the modules.list -->
<path id="modules.archives">
<fileset dir="${temp}/WEB-INF/modules">
<include name="*.mar" />
</fileset>
</path>
<pathconvert pathsep="${line.separator}" property="echo.modules.archives" refid="modules.archives">
<flattenmapper />
</pathconvert>
<echo file="${temp}/WEB-INF/modules/modules.list" message="${echo.modules.archives}" />
<!-- Copying the axis2.xml from ../conf -->
<mkdir dir="${temp}/WEB-INF/conf" />
<copy file="conf/axis2.xml" toDir="${temp}/WEB-INF/conf" />
</target>
<target depends="init,prepare.repo" name="create.war">
<war destfile="dist/axis2.war" webxml="webapp/WEB-INF/web.xml">
<lib dir="lib">
<include name="**" />
<exclude name="**servlet**" />
<exclude name="ant*.jar" />
</lib>
<webinf dir="${temp}/WEB-INF" />
<fileset dir="${temp}">
<include name="**/axis2-web/**" />
</fileset>
</war>
<delete dir="${temp}" />
</target>
</project>