]> SALOME platform Git repositories - tools/siman.git/blob
Salome HOME
91e5a18739545c755a3f9364eeda16ed676e7ae3
[tools/siman.git] /
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="Siman-War" default="build-war">
3
4         <property environment="env" />
5
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" />
9
10         <property name="time.simple.pattern" value="dd/MM/yyyy" />
11         <tstamp>
12                 <format property="timesimple" pattern="${time.simple.pattern}" />
13         </tstamp>
14
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}" />
20         </target>
21         <target name="tmp" description="Builds Siman-Common project">
22                 <macrodef name="ttt">
23                         <attribute name="target" />
24                         <sequential>
25                                 <echo message="trtr=${siman.@{target}.dir}" />
26                         </sequential>
27                 </macrodef>
28                 <ttt target="${siman.dist.dir}"/>
29         </target>
30
31         <!-- ================================================= -->
32         <!--    gen-config: Generate parametrized config files -->
33         <!-- ================================================= -->
34         <target name="gen-config" description="Generate parametrized config files">
35                 <echo message="Generating configuration in ${config.mode} mode..." />
36                 <if>
37                         <equals arg1="${config.mode}" arg2="debug" casesensitive="false" />
38                         <then>
39                                 <copy todir="${basedir}/${config.${config.mode}.dir}" overwrite="true">
40                                         <fileset dir="${config.src.dir}/templates">
41                                         </fileset>
42                                         <filterset>
43                                                 <filtersfile file="${config.src.dir}/${config.mode}.properties" />
44                                         </filterset>
45                                 </copy>
46                         </then>
47                         <else>
48                         </else>
49                 </if>
50         </target>
51
52         <!-- ===================================================================== -->
53         <!-- build-dist : Create the war file                                                      -->
54         <!-- ===================================================================== -->
55         <target name="build-war" depends="clean, siman-common" description="Builds the WAR distribution">
56                 <echo message="build ${webapp.name}.war" />
57
58                 <mkdir dir="${siman.dist.dir}" />
59                 <war destfile="${siman.dist.dir}/${webapp.name}.war" webxml="${basedir}/${siman.content.dir}/WEB-INF/web.xml">
60                         <fileset dir="${siman.content.dir}" />
61                         <webinf dir="${siman.bin.dir}" />
62                         <manifest>
63                                 <attribute name="Built-By" value="${app.author}" />
64                                 <attribute name="Version" value="${app.version}" />
65                                 <attribute name="Built-Date" value="${timesimple}" />
66                         </manifest>
67                         <lib dir="${basedir}/../${siman-common.project.name}/${siman-common.dist.dir}" includes="**/*.jar" />
68                         <lib dir="${basedir}/../${siman-common.project.name}/${siman-common.lib.dir}" includes="**/*.jar" />
69                         <lib dir="${basedir}/../${splat.project.name}/${splat.dist.dir}" includes="**/*.jar" />
70                         <lib dir="${basedir}/../${splat.project.name}/${splat.lib.dir}" includes="**/*.jar" />
71                 </war>
72         </target>
73
74         <!-- ================================================= -->
75         <!--    clean: Clean the dist directory                            -->
76         <!-- ================================================= -->
77         <target name="clean" description="clean the build directory">
78                 <echo message="deleting files in ${siman.dist.dir}" />
79                 <delete includeemptydirs="true" failonerror="false">
80                         <fileset dir="${siman.dist.dir}" includes="**/*" />
81                 </delete>
82         </target>
83 </project>