Salome HOME
Fix for 2 issues:
[tools/siman.git] / Workspace / SPlat / build.xml
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         <!--    jar: Build jars                                            -->
53         <!-- ================================================= -->
54         <target name="jar" depends="manox-jar" description="compile and create the jar file in dist directory">
55         </target>
56
57         <!-- ================================================= -->
58         <!--    build: Compile and create the dist target          -->
59         <!-- ================================================= -->
60         <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
61         </target>
62
63
64         <!-- ================================================= -->
65         <!--    rebuild: Compile and create the dist target        -->
66         <!-- ================================================= -->
67         <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
68         </target>
69
70         <!-- ================================================= -->
71         <!--    clean: Clean the dist directory                            -->
72         <!-- ================================================= -->
73         <target name="clean" description="clean the build directory">
74                 <echo message="deleting files in ${splat.dist.dir}" />
75                 <delete includeemptydirs="true" failonerror="false">
76                         <fileset dir="${splat.dist.dir}" includes="**/*" />
77                 </delete>
78         </target>
79
80         <!-- ================================================== -->
81         <!-- help : display the help page                       -->
82         <!-- ================================================== -->
83         <target name="help">
84                 <java fork="no" classname="org.apache.tools.ant.Main">
85                         <arg line="-projecthelp" />
86                 </java>
87         </target>
88
89         <!-- ================================================= -->
90         <!--    compile: Compile the sources files                         -->
91         <!-- ================================================= -->
92         <target name="compile" description="compile source code">
93                 <echo message="compiling SIMAN SALOME Platform" />
94                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
95                 <echo message="build repository : ${splat.build.dir}" />
96                 <echo message="splat.lib.dir : ${splat.lib.dir}" />
97
98 <!--            <mkdir dir="${splat.build.dir}" />
99                 <mkdir dir="${splat.build.dir}/classes" />
100                 <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}">
101                         <src path="${splat.src.dir}" />
102                         <classpath>
103                                 <path refid="dependencies.classpath" />
104                         </classpath>
105                         <exclude name="test/**" />
106                 </javac>
107                 <copy todir="${splat.build.dir}/classes">
108                         <fileset dir="${splat.src.dir}/conf">
109                         </fileset>
110                         <fileset dir="${splat.src.dir}/java">
111                                 <include name="com/**/*.xsd"/>
112                         </fileset>
113                 </copy>
114                 <mkdir dir="${splat.build.dir}/classes/META-INF" />-->
115         </target>
116
117
118         
119         <!-- ================================================= -->
120         <!--    Compile tests                                                              -->
121         <!--    Compile the tests sources file in build/tests  -->
122         <!-- ================================================= -->
123         <target name="compile-tests" description="compile source code">
124                 <echo message="compiling splat tests classes" />
125                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
126                 <echo message="build repository : ${splat.build.dir}" />
127                 <echo message="splat.lib.dir : ${splat.lib.dir}" />
128
129                 <mkdir dir="${splat.build.dir}" />
130                 <mkdir dir="${splat.build.dir}/classes" />
131                 <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}">
132                         <src path="${splat.dir}/test" />
133                         <classpath>
134                                 <path refid="dependencies.classpath" />
135                                 <path refid="test.libs.classpath" />
136                         </classpath>
137                         <include name="test/**" />
138                         <exclude name="com/**" />
139                         <exclude name="org/**" />
140                 </javac>
141         </target>
142
143 </project>