Salome HOME
ddc938f6df6adae5fb8f1465cf24093c61af3fb2
[tools/siman.git] / Workspace / .metadata / .plugins / org.eclipse.core.resources / .history / 1b / 00bc1b3abb03001210aca2509c1ad977
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="SIMAN SALOME Platform builder" default="build">
3
4         <property environment="env" />
5         <property file="build.properties" description="set the build parameters" />
6         
7         <path id="dependencies.classpath">
8                 <fileset dir="${tomcat.war.build.dir}">    
9                         <include name="${splat.lib.dir}/*.*"/>
10                 </fileset>
11         </path>
12
13         <path id="test.libs.classpath">
14                 <pathelement location="${splat.lib.dir}/testng/testng-5.8-jdk15.jar" />
15                 <pathelement location="${splat.lib.dir}/spring/spring-test.jar" />
16         </path>
17
18         
19         <property name="time.simple.pattern" value="dd/MM/yyyy" />
20         <tstamp>
21                 <format property="timesimple" pattern="${time.simple.pattern}" />
22         </tstamp>
23
24         <!-- ================================================= -->
25         <!--    build-splat-jar: Create the splat jar file         --> 
26         <!-- ================================================= -->
27         <target name="build-splat-jar" description="create jar file in dist directory">
28                 <echo message="build splat-${jar.name}.jar"/>
29                 <mkdir dir="${splat.dist.dir}" />
30                 <jar destfile="${splat.dist.dir}/splat-${jar.name}.jar" >
31                         <zipfileset dir="${splat.bin.dir}/">
32                                 <include name="org/splat/${jar.name}/**" />
33                         </zipfileset>
34                         <manifest>
35                                 <attribute name="Built-By" value="${app.author}" />
36                                 <attribute name="Version" value="${app.version}" />
37                                 <attribute name="Built-Date" value="${timesimple}" />
38                         </manifest>
39                 </jar>
40         </target>
41
42         <!-- ================================================= -->
43         <!--    manox-jar: Create the manox jar file               -->
44         <!-- ================================================= -->
45         <target name="manox-jar" description="create jar file in dist directory">
46                 <antcall target="build-splat-jar">
47                         <param name="jar.name" value="manox"/>
48                 </antcall>
49         </target>
50         
51         <!-- ================================================= -->
52         <!--    kernel-jar: Create the kernel jar file             -->
53         <!-- ================================================= -->
54         <target name="kernel-jar" description="create jar file in dist directory">
55                 <antcall target="build-splat-jar">
56                         <param name="jar.name" value="kernel"/>
57                 </antcall>
58         </target>
59         
60         <!-- ================================================= -->
61         <!--    som-jar: Create the som jar file                           -->
62         <!-- ================================================= -->
63         <target name="som-jar" description="create jar file in dist directory">
64                 <antcall target="build-splat-jar">
65                         <param name="jar.name" value="som"/>
66                 </antcall>
67         </target>
68
69         <!-- ================================================= -->
70         <!--    jar: Build jars                                            -->
71         <!-- ================================================= -->
72         <target name="jar" depends="kernel-jar,som-jar,manox-jar" description="compile and create the jar file in dist directory">
73         </target>
74
75         <!-- ================================================= -->
76         <!--    build: Compile and create the dist target          -->
77         <!-- ================================================= -->
78         <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
79         </target>
80
81
82         <!-- ================================================= -->
83         <!--    rebuild                                                                            -->
84         <!--    Compile and create the dist target                         -->
85         <!-- ================================================= -->
86         <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
87         </target>
88
89         <!-- ================================================= -->
90         <!--    Clean                                                                              -->
91         <!--    Clean the dist directory                                           -->
92         <!-- ================================================= -->
93         <target name="clean" description="clean the build directory">
94                 <echo message="deleting files in ${splat.dist.dir}" />
95                 <delete includeemptydirs="true" failonerror="false">
96                         <fileset dir="${splat.dist.dir}" includes="**/*" />
97                 </delete>
98         </target>
99
100         <!-- ============================================================================ -->
101         <!-- help : display the help page                                                 -->
102         <!-- ============================================================================ -->
103         <target name="help">
104                 <java fork="no" classname="org.apache.tools.ant.Main">
105                         <arg line="-projecthelp" />
106                 </java>
107         </target>
108
109         <!-- ================================================= -->
110         <!--    Compile                                                                            -->
111         <!--    Compile the sources file in build/classes          -->
112         <!-- ================================================= -->
113         <target name="compile" description="compile source code">
114                 <echo message="compiling SIMAN SALOME Platform" />
115                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
116                 <echo message="build repository : ${splat.build.dir}" />
117                 <echo message="splat.lib.dir : ${splat.lib.dir}" />
118
119 <!--            <mkdir dir="${splat.build.dir}" />
120                 <mkdir dir="${splat.build.dir}/classes" />
121                 <javac target="1.5" destdir="${splat.build.dir}/classes" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true" optimize="${compiler.optimize}" deprecation="${compiler.deprecation}">
122                         <src path="${splat.src.dir}" />
123                         <classpath>
124                                 <path refid="dependencies.classpath" />
125                         </classpath>
126                         <exclude name="test/**" />
127                 </javac>
128                 <copy todir="${splat.build.dir}/classes">
129                         <fileset dir="${splat.src.dir}/conf">
130                         </fileset>
131                         <fileset dir="${splat.src.dir}/java">
132                                 <include name="com/**/*.xsd"/>
133                         </fileset>
134                 </copy>
135                 <mkdir dir="${splat.build.dir}/classes/META-INF" />-->
136         </target>
137
138
139         
140         <!-- ================================================= -->
141         <!--    Compile tests                                                                      -->
142         <!--    Compile the tests sources file in build/tests      -->
143         <!-- ================================================= -->
144         <target name="compile-tests" description="compile source code">
145                 <echo message="compiling splat tests classes" />
146                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
147                 <echo message="build repository : ${splat.build.dir}" />
148                 <echo message="splat.lib.dir : ${splat.lib.dir}" />
149
150                 <mkdir dir="${splat.build.dir}" />
151                 <mkdir dir="${splat.build.dir}/classes" />
152                 <javac destdir="${splat.build.dir}/classes" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true" optimize="${compiler.optimize}" deprecation="${compiler.deprecation}">
153                         <src path="${splat.dir}/test" />
154                         <classpath>
155                                 <path refid="dependencies.classpath" />
156                                 <path refid="test.libs.classpath" />
157                         </classpath>
158                         <include name="test/**" />
159                         <exclude name="com/**" />
160                         <exclude name="org/**" />
161                 </javac>
162         </target>
163
164 </project>