Salome HOME
451bc4d29ba915bfe21cde17f443bb77ff5c706e
[tools/siman.git] / Workspace / .metadata / .plugins / org.eclipse.core.resources / .history / 38 / a0699efb480200121424e2083ec3deca
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="SIMAN SALOME Platform builder" default="help">
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                                                            -->
26         <!--    Create the jar file in the dist directory          -->
27         <!-- ================================================= -->
28         <target name="build-splat-jar" description="create jar file in dist directory">
29                 <echo message="build splat-${jar.name}.jar"/>
30                 <mkdir dir="${splat.dist.dir}" />
31                 <jar destfile="${splat.dist.dir}/splat-${jar.name}.jar}" >
32                         <zipfileset dir="${splat.bin.dir}/">
33                                 <include name="org/splat/${jar.name}/**" />
34                         </zipfileset>
35                         <manifest>
36                                 <attribute name="Built-By" value="${app.author}" />
37                                 <attribute name="Version" value="${app.version}" />
38                                 <attribute name="Built-Date" value="${timesimple}" />
39                         </manifest>
40                 </jar>
41         </target>
42
43         <!-- ================================================= -->
44         <!--    Jar                                                                                        -->
45         <!--    Create the jar file in the dist directory          -->
46         <!-- ================================================= -->
47         <target name="build-splat-manox-jar" description="create jar file in dist directory">
48                 <antcall target="build-splat-jar">
49                         <param name="jar.name" value="manox"/>
50                 </antcall>
51         </target>
52         
53         <!-- ================================================= -->
54         <!--    Jar                                                                                        -->
55         <!--    Create the jar file in the dist directory          -->
56         <!-- ================================================= -->
57         <target name="build-splat-kernel-jar" description="create jar file in dist directory">
58                 <antcall target="build-splat-jar">
59                         <param name="jar.name" value="kernel"/>
60                 </antcall>
61         </target>
62         
63         <!-- ================================================= -->
64         <!--    Jar                                                                                        -->
65         <!--    Create the jar file in the dist directory          -->
66         <!-- ================================================= -->
67         <target name="build-splat-som-jar" description="create jar file in dist directory">
68                 <antcall target="build-splat-jar">
69                         <param name="jar.name" value="som"/>
70                 </antcall>
71         </target>
72         
73         <!-- ================================================= -->
74         <!--    Jar                                                                                        -->
75         <!--    Create the jar file in the dist directory          -->
76         <!-- ================================================= -->
77         <target name="splat-manox-jar" description="create jar file in dist directory">
78                 <mkdir dir="${splat.dist.dir}" />
79                 <jar destfile="${splat.dist.dir}/${splat.manox.jar.name}" >
80                         <zipfileset dir="${splat.bin.dir}/">
81                                 <include name="${source.splat-manox.jar}/**" />
82                         </zipfileset>
83                         <manifest>
84                                 <attribute name="Built-By" value="${app.author}" />
85                                 <attribute name="Version" value="${app.version}" />
86                                 <attribute name="Built-Date" value="${timesimple}" />
87                         </manifest>
88                 </jar>
89         </target>
90
91         <!-- ================================================= -->
92         <!--    Jar                                                                                        -->
93         <!--    Create the jar file in the dist directory          -->
94         <!-- ================================================= -->
95         <target name="splat-kernel-jar" description="create jar file in dist directory">
96                 <mkdir dir="${splat.dist.dir}" />
97                 <jar destfile="${splat.dist.dir}/${splat.kernel.jar.name}" >
98                         <zipfileset dir="${splat.bin.dir}/">
99                                 <include name="${source.splat-kernel.jar}/**" />
100                         </zipfileset>
101                         <manifest>
102                                 <attribute name="Built-By" value="${app.author}" />
103                                 <attribute name="Version" value="${app.version}" />
104                                 <attribute name="Built-Date" value="${timesimple}" />
105                         </manifest>
106                 </jar>
107         </target>
108
109         <!-- ================================================= -->
110         <!--    Jar                                                                                -->
111         <!--    Build jars                                                 -->
112         <!-- ================================================= -->
113         <target name="jar" depends="build-splat-kernel-jar,build-splat-som-jar,build-splat-manox-jar" description="compile and create the jar file in dist directory">
114         </target>
115
116         <!-- ================================================= -->
117         <!--    Build                                                                              -->
118         <!--    Compile and create the dist target                         -->
119         <!-- ================================================= -->
120         <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
121         </target>
122
123
124         <!-- ================================================= -->
125         <!--    rebuild                                                                            -->
126         <!--    Compile and create the dist target                         -->
127         <!-- ================================================= -->
128         <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
129         </target>
130
131         <!-- ================================================= -->
132         <!--    Clean                                                                              -->
133         <!--    Clean the build directory                                          -->
134         <!-- ================================================= -->
135         <target name="clean" description="clean the build directory">
136                 <echo message="deleting files in ${splat.dist.dir}" />
137                 <delete includeemptydirs="true" failonerror="false">
138                         <fileset dir="${splat.dist.dir}" includes="**/*" />
139                 </delete>
140                 <echo message="deleting files in ${splat.build.dir}" />
141                 <delete includeemptydirs="true" failonerror="false">
142                         <fileset dir="${splat.build.dir}" includes="**/*" />
143                 </delete>
144         </target>
145
146         <!-- ============================================================================ -->
147         <!-- help : display the help page                                                 -->
148         <!-- ============================================================================ -->
149         <target name="help">
150                 <java fork="no" classname="org.apache.tools.ant.Main">
151                         <arg line="-projecthelp" />
152                 </java>
153         </target>
154
155         <!-- ================================================= -->
156         <!--    Compile                                                                            -->
157         <!--    Compile the sources file in build/classes          -->
158         <!-- ================================================= -->
159         <target name="compile" description="compile source code">
160                 <echo message="compiling SIMAN SALOME Platform" />
161                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
162                 <echo message="build repository : ${splat.build.dir}" />
163                 <echo message="splat.lib.dir : ${splat.lib.dir}" />
164
165                 <mkdir dir="${splat.build.dir}" />
166                 <mkdir dir="${splat.build.dir}/classes" />
167                 <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}">
168                         <src path="${splat.src.dir}" />
169                         <classpath>
170                                 <path refid="dependencies.classpath" />
171                         </classpath>
172                         <exclude name="test/**" />
173                 </javac>
174                 <copy todir="${splat.build.dir}/classes">
175                         <fileset dir="${splat.src.dir}/conf">
176                         </fileset>
177                         <fileset dir="${splat.src.dir}/java">
178                                 <include name="com/**/*.xsd"/>
179                         </fileset>
180                 </copy>
181                 <mkdir dir="${splat.build.dir}/classes/META-INF" />
182         </target>
183
184
185         
186         <!-- ================================================= -->
187         <!--    Compile tests                                                                      -->
188         <!--    Compile the tests sources file in build/tests      -->
189         <!-- ================================================= -->
190         <target name="compile-tests" description="compile source code">
191                 <echo message="compiling splat tests classes" />
192                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
193                 <echo message="build repository : ${splat.build.dir}" />
194                 <echo message="splat.lib.dir : ${splat.lib.dir}" />
195
196                 <mkdir dir="${splat.build.dir}" />
197                 <mkdir dir="${splat.build.dir}/classes" />
198                 <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}">
199                         <src path="${splat.dir}/test" />
200                         <classpath>
201                                 <path refid="dependencies.classpath" />
202                                 <path refid="test.libs.classpath" />
203                         </classpath>
204                         <include name="test/**" />
205                         <exclude name="com/**" />
206                         <exclude name="org/**" />
207                 </javac>
208         </target>
209
210 </project>