Salome HOME
PMD plugin is refreshed. Some code is modified to respect PMD rules. Ant build proced...
[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         <mkdir dir="${siman-common.bin.dir}/temp"/>
40         <javac target="1.6" srcdir="${siman-common.src.dir}"  destdir="${siman-common.bin.dir}/temp" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true" optimize="${compiler.optimize}" deprecation="${compiler.deprecation}">
41             <classpath>
42                 <path refid="ext.classpath" />
43                 <fileset dir="../${splat.project.name}/${splat.dist.dir}" includes="**/*" />
44                 <fileset dir="../${splat.project.name}/${splat.lib.dir}" includes="**/*" />
45                 <fileset dir="${siman-common.lib.dir}" includes="**/*" />
46              </classpath>
47             <exclude name="test/**" />
48         </javac>
49     </target>
50
51         <!-- ================================================= -->
52         <!--    build-dist: Create the JAR distribution            -->
53         <!-- ================================================= -->
54         <target name="build-dist" depends="clean, splat, compile-java, build-stub" description="Builds the JAR distribution">
55                 <echo message="build ${siman-common.jar.name}" />
56
57                 <!--    <antcall target="compile-java">
58                 </antcall>-->
59
60                 <mkdir dir="${siman-common.dist.dir}" />
61                 <jar destfile="${siman-common.dist.dir}/${siman-common.jar.name}">
62                         <zipfileset dir="${siman-common.bin.dir}">
63                                 <include name="**" />
64                 <exclude name="test" />
65                 <exclude name="temp" />
66                 <exclude name="test/**" />
67                 <exclude name="temp/**" />
68                                 <exclude name="**/datasourceContextTomcat.xml" />
69                         </zipfileset>
70                         <manifest>
71                                 <attribute name="Built-By" value="${app.author}" />
72                                 <attribute name="Version" value="${app.version}" />
73                                 <attribute name="Built-Date" value="${timesimple}" />
74                         </manifest>
75                 </jar>
76                 <!--            <jar destfile="${hewis-lib-common.dist.dir}/${hewis-lib-common.itf.jar.name}">
77                         <zipfileset dir="${build.classes.dir}">
78                                 <include name="**/*.properties" />
79                                 <include name="**/*Enum.class" />
80                                 <include name="**/*Utils.class" />
81                                 <include name="**/*Props.class" />
82                                 <include name="**/wsclient/dto/*DTO.class" />
83                                 <exclude name="test" />
84                         </zipfileset>
85                         <manifest>
86                                 <attribute name="Built-By" value="EURIWARE" />
87                                 <attribute name="Version" value="${app.version}" />
88                                 <attribute name="Built-Date" value="${timesimple}" />
89                         </manifest>
90                 </jar>-->
91         </target>
92
93         <!-- ================================================= -->
94         <!--    clean: Clean the dist directory                            -->
95         <!-- ================================================= -->
96         <target name="clean" description="clean the build directory">
97                 <echo message="deleting files in ${splat.dist.dir}" />
98                 <delete includeemptydirs="true" failonerror="false">
99                         <fileset dir="${splat.dist.dir}" includes="**/*" />
100                 </delete>
101         </target>
102 </project>