Salome HOME
VPV fix for the following case:
[tools/siman.git] / Workspace / Siman-Common / build.xml
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <project default="build-dist" name="SIMAN Common Jar builder">
3         <!--this file was created by Eclipse Runnable JAR Export Wizard-->
4         <!--ANT 1.7 is required                                        -->
5         <property environment="env" />
6         <property file="../SPlat/build.properties" description="set the SPlat build parameters" />
7         <property file="build.properties" description="set the build parameters" />
8
9         <!-- ================================================= -->
10         <!--    build-stub: Build siman-stub.jar                           -->
11         <!-- ================================================= -->
12         <target name="build-stub" description="Build the hewis-stub.jar">
13                 <!--<ant antfile="${hewis-stub.dir}/build.xml" target="build-stub-dist" inheritall="false">
14                         <property name="project.dir" value="${project.dir}" />
15                         <property name="compiler.debug" value="${compiler.debug}" />
16                         <property name="compiler.generate.no.warnings" value="${compiler.generate.no.warnings}" />
17                         <property name="compiler.max.memory" value="${compiler.max.memory}" />
18                         <property name="compiler.optimize" value="${compiler.optimize}" />
19                         <property name="compiler.deprecation" value="${compiler.deprecation}" />
20                 </ant>-->
21         </target>
22
23         <!-- ================================================= -->
24         <!--    splat: Build SPlat project                                         -->
25         <!-- ================================================= -->
26         <target name="splat" description="Builds SPlat project">
27                 <ant dir="../${splat.project.name}" />
28         </target>
29
30     <path id="ext.classpath">
31         <pathelement location="${siman-common.ext.dir}/*" />
32     </path>
33         
34     <!-- ===================================================================== -->
35     <!-- compile-java : compile the java classes                               -->
36     <!-- ===================================================================== -->
37     <target name="compile-java" depends="splat" description="Builds the java classes">
38         <echo message="Compile Siman-Common java classes" />
39 <!--        <delete dir="${basedir}/../${siman-common.project.name}/temp" quiet="true"/>-->
40         <mkdir dir="temp"/>
41         <javac target="1.6" srcdir="${basedir}/../${siman-common.project.name}/${siman-common.src.dir}"  
42             destdir="temp" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" optimize="${compiler.optimize}" deprecation="${compiler.deprecation}">
43             <classpath>
44                 <path refid="ext.classpath" />
45                 <fileset dir="${basedir}/../${splat.project.name}/${splat.dist.dir}" includes="**/*" />
46                 <fileset dir="${basedir}/../${splat.project.name}/${splat.lib.dir}" includes="**/*" />
47                 <fileset dir="${basedir}/../${siman-common.project.name}/${siman-common.lib.dir}" includes="**/*" />
48              </classpath>
49             <exclude name="test/**" />
50         </javac>
51     </target>
52
53         <!-- ================================================= -->
54         <!--    build-dist: Create the JAR distribution            -->
55         <!-- ================================================= -->
56         <target name="build-dist" depends="clean, splat, compile-java, build-stub" description="Builds the JAR distribution">
57                 <echo message="build ${siman-common.jar.name}" />
58
59                 <mkdir dir="${siman-common.dist.dir}" />
60                 <jar destfile="${siman-common.dist.dir}/${siman-common.jar.name}">
61                         <zipfileset dir="${siman-common.bin.dir}">
62                                 <include name="**" />
63                 <exclude name="test" />
64                 <exclude name="temp" />
65                 <exclude name="test/**" />
66                 <exclude name="temp/**" />
67                                 <exclude name="**/datasourceContextTomcat.xml" />
68                         </zipfileset>
69                         <manifest>
70                                 <attribute name="Built-By" value="${app.author}" />
71                                 <attribute name="Version" value="${app.version}" />
72                                 <attribute name="Built-Date" value="${timesimple}" />
73                         </manifest>
74                 </jar>
75                 <!--            <jar destfile="${hewis-lib-common.dist.dir}/${hewis-lib-common.itf.jar.name}">
76                         <zipfileset dir="${build.classes.dir}">
77                                 <include name="**/*.properties" />
78                                 <include name="**/*Enum.class" />
79                                 <include name="**/*Utils.class" />
80                                 <include name="**/*Props.class" />
81                                 <include name="**/wsclient/dto/*DTO.class" />
82                                 <exclude name="test" />
83                         </zipfileset>
84                         <manifest>
85                                 <attribute name="Built-By" value="EURIWARE" />
86                                 <attribute name="Version" value="${app.version}" />
87                                 <attribute name="Built-Date" value="${timesimple}" />
88                         </manifest>
89                 </jar>-->
90         </target>
91
92         <!-- ================================================= -->
93         <!--    clean: Clean the dist directory                            -->
94         <!-- ================================================= -->
95         <target name="clean" description="clean the build directory">
96                 <echo message="deleting files in ${splat.dist.dir}" />
97                 <delete includeemptydirs="true" failonerror="false">
98                         <fileset dir="${splat.dist.dir}" includes="**/*" />
99                 </delete>
100         </target>
101
102     <!-- ================================================= -->
103     <!--    prepare-postgres: Prepare test config for Postgress -->
104     <!-- ================================================= -->
105     <target name="prepare-test-postgres" description="prepare test configuration for Postgress">
106         <echo message="Prepare test configuration for Postgress..." />
107         <copy file="src/test/pg_jdbc.properties" tofile="src/test/jdbc.properties" overwrite="true"/>
108         <copy file="src/test/pg_hibernate.properties" tofile="src/test/hibernate.properties" overwrite="true"/>
109     </target>
110     
111     <!-- ================================================= -->
112     <!--    prepare-postgres: Prepare test config for MySql -->
113     <!-- ================================================= -->
114     <target name="prepare-mysql" description="prepare test configuration for MySql">
115         <echo message="Prepare test configuration for MySql..." />
116         <copy file="src/test/mysql_jdbc.properties" tofile="src/test/jdbc.properties" overwrite="true"/>
117         <copy file="src/test/mysql_hibernate.properties" tofile="src/test/hibernate.properties" overwrite="true"/>
118     </target>
119 </project>