1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="Siman-War" default="build-war">
4 <property environment="env" />
6 <property file="build.properties" description="set the build parameters" />
7 <property file="../${siman-common.project.name}/build.properties" description="set the build parameters" />
8 <property file="../${splat.project.name}/build.properties" description="set the build parameters" />
10 <property name="time.simple.pattern" value="dd/MM/yyyy" />
12 <format property="timesimple" pattern="${time.simple.pattern}" />
15 <!-- ================================================= -->
16 <!-- siman-common: Build Siman-Common project -->
17 <!-- ================================================= -->
18 <target name="siman-common" description="Builds Siman-Common project">
19 <ant dir="../${siman-common.project.name}" />
22 <!-- ================================================= -->
23 <!-- copy-config: Copy parametrized config files -->
24 <!-- ================================================= -->
25 <macrodef name="copy-config">
26 <attribute name="mode" />
28 <echo message="Generating configuration in @{mode} mode" />
29 <copy todir="${basedir}/${config.@{mode}.dir}" overwrite="true">
30 <fileset dir="${config.src.dir}/templates">
33 <filtersfile file="${config.src.dir}/@{mode}.properties" />
39 <!-- ================================================= -->
40 <!-- debug-config: Generate parametrized config files -->
41 <!-- ================================================= -->
42 <target name="debug-config" description="Generate parametrized debug config files">
43 <copy-config mode="debug"/>
46 <!-- =================================================== -->
47 <!-- release-config: Generate parametrized config files -->
48 <!-- =================================================== -->
49 <target name="release-config" description="Generate parametrized release config files">
50 <copy-config mode="release"/>
53 <!-- ===================================================================== -->
54 <!-- build-dist : Create the war file -->
55 <!-- ===================================================================== -->
56 <target name="build-war" depends="clean, siman-common" description="Builds the WAR distribution">
57 <echo message="build ${webapp.name}.war" />
59 <mkdir dir="${siman.dist.dir}" />
60 <war destfile="${siman.dist.dir}/${webapp.name}.war" webxml="${basedir}/${siman.content.dir}/WEB-INF/web.xml">
61 <fileset dir="${siman.content.dir}" />
62 <webinf dir="${siman.bin.dir}" />
64 <attribute name="Built-By" value="${app.author}" />
65 <attribute name="Version" value="${app.version}" />
66 <attribute name="Built-Date" value="${timesimple}" />
68 <lib dir="${basedir}/../${siman-common.project.name}/${siman-common.dist.dir}" includes="**/*.jar" />
69 <lib dir="${basedir}/../${siman-common.project.name}/${siman-common.lib.dir}" includes="**/*.jar" />
70 <lib dir="${basedir}/../${splat.project.name}/${splat.dist.dir}" includes="**/*.jar" />
71 <lib dir="${basedir}/../${splat.project.name}/${splat.lib.dir}" includes="**/*.jar" />
75 <!-- ================================================= -->
76 <!-- clean: Clean the dist directory -->
77 <!-- ================================================= -->
78 <target name="clean" description="clean the build directory">
79 <echo message="deleting files in ${siman.dist.dir}" />
80 <delete includeemptydirs="true" failonerror="false">
81 <fileset dir="${siman.dist.dir}" includes="**/*" />