]> SALOME platform Git repositories - tools/siman.git/blob
Salome HOME
9cd1d752e980891964ecb7ff7a92a69e50326eab
[tools/siman.git] /
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="server.classpath">
8                 <pathelement location="${weblogic.home}/server/lib/weblogic.jar" />
9         </path>
10
11         <path id="dependencies.classpath">
12                 <pathelement location="${hewis.lib.dir}/commons/commons-logging-1.1.1.jar" />
13                 <pathelement location="${hewis.lib.dir}/commons/commons-lang-2.3.jar" />
14                 <pathelement location="${hewis.lib.dir}/commons/commons-io-1.4.jar" />
15                 <pathelement location="${hewis.lib.dir}/struts2/struts2-core-2.0.11.1.jar" />
16                 <pathelement location="${hewis.lib.dir}/struts2/xwork-2.0.4.jar" />
17                 <pathelement location="${hewis.lib.dir}/displaytag/displaytag-hw-ext.jar" />
18                 <pathelement location="${hewis.lib.dir}/displaytag/displaytag-export-poi-1.1.1.jar" />
19                 <pathelement location="${hewis.lib.dir}/spring/spring.jar" />
20                 <pathelement location="${hewis.lib.dir}/beanlib/beanlib-5.0.1beta.jar" />
21                 <pathelement location="${hewis.lib.dir}/springsecurity/spring-security-core-2.0.2.jar" />
22                 <pathelement location="${hewis.lib.dir}/htmlparser/htmllexer.jar" />
23                 <pathelement location="${hewis.lib.dir}/htmlparser/htmlparser.jar" />
24                 <pathelement location="${hewis.lib.dir}/log4j/log4j-1.2.14.jar" />
25         </path>
26
27         <path id="test.libs.classpath">
28                 <pathelement location="${hewis.lib.dir}/testng/testng-5.8-jdk15.jar" />
29                 <pathelement location="${hewis.lib.dir}/spring/spring-test.jar" />
30         </path>
31
32         
33         <property name="time.simple.pattern" value="dd/MM/yyyy" />
34         <tstamp>
35                 <format property="timesimple" pattern="${time.simple.pattern}" />
36         </tstamp>
37
38         <!-- ================================================= -->
39         <!--    Compile                                                                            -->
40         <!--    Compile the sources file in build/classes          -->
41         <!-- ================================================= -->
42         <target name="compile" description="compile source code">
43                 <echo message="compiling framework" />
44                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
45                 <echo message="build repository : ${framework.build.dir}" />
46                 <echo message="hewis.lib.dir : ${hewis.lib.dir}" />
47
48                 <mkdir dir="${framework.build.dir}" />
49                 <mkdir dir="${framework.build.dir}/classes" />
50                 <javac target="1.5" destdir="${framework.build.dir}/classes" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true" optimize="${compiler.optimize}" deprecation="${compiler.deprecation}">
51                         <src path="${framework.src.dir}/java" />
52                         <classpath>
53                                 <path refid="server.classpath" />
54                                 <path refid="dependencies.classpath" />
55                         </classpath>
56                         <exclude name="test/**" />
57                 </javac>
58                 <copy todir="${framework.build.dir}/classes">
59                         <fileset dir="${framework.src.dir}/conf">
60                         </fileset>
61                         <fileset dir="${framework.src.dir}/java">
62                                 <include name="com/**/*.xsd"/>
63                         </fileset>
64                 </copy>
65                 <mkdir dir="${framework.build.dir}/classes/META-INF" />
66         </target>
67
68
69         
70         <!-- ================================================= -->
71         <!--    Compile tests                                                                      -->
72         <!--    Compile the tests sources file in build/tests      -->
73         <!-- ================================================= -->
74         <target name="compile-tests" description="compile source code">
75                 <echo message="compiling framework tests classes" />
76                 <echo message="compiler.max.memory : ${compiler.max.memory}" />
77                 <echo message="build repository : ${framework.build.dir}" />
78                 <echo message="hewis.lib.dir : ${hewis.lib.dir}" />
79
80                 <mkdir dir="${framework.build.dir}" />
81                 <mkdir dir="${framework.build.dir}/classes" />
82                 <javac destdir="${framework.build.dir}/classes" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true" optimize="${compiler.optimize}" deprecation="${compiler.deprecation}">
83                         <src path="${framework.dir}/test" />
84                         <classpath>
85                                 <path refid="server.classpath" />
86                                 <path refid="dependencies.classpath" />
87                                 <path refid="test.libs.classpath" />
88                         </classpath>
89                         <include name="test/**" />
90                         <exclude name="com/**" />
91                         <exclude name="org/**" />
92                 </javac>
93         </target>
94
95         
96         
97         <!-- ================================================= -->
98         <!--    Jar                                                                                        -->
99         <!--    Create the jar file in the dist directory          -->
100         <!-- ================================================= -->
101         <target name="jar" description="create jar file in dist directory">
102                 <mkdir dir="${framework.dist.dir}" />
103                 <jar destfile="${framework.dist.dir}/${framework.jar.name}">
104                         <zipfileset dir="${framework.build.dir}/classes">
105                                 <include name="**" />
106                                 <exclude name="test" />
107                         </zipfileset>
108                         <manifest>
109                                 <attribute name="Built-By" value="EURIWARE" />
110                                 <attribute name="Version" value="${app.version}" />
111                                 <attribute name="Built-Date" value="${timesimple}" />
112                         </manifest>
113                 </jar>
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 ${framework.dist.dir}" />
137                 <delete includeemptydirs="true" failonerror="false">
138                         <fileset dir="${framework.dist.dir}" includes="**/*" />
139                 </delete>
140                 <echo message="deleting files in ${framework.build.dir}" />
141                 <delete includeemptydirs="true" failonerror="false">
142                         <fileset dir="${framework.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 </project>