1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="SIMAN SALOME Platform builder" default="help">
4 <property environment="env" />
5 <property file="build.properties" description="set the build parameters" />
7 <path id="dependencies.classpath">
8 <fileset dir="${tomcat.war.build.dir}">
9 <include name="${splat.lib.dir}/*.*"/>
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" />
19 <property name="time.simple.pattern" value="dd/MM/yyyy" />
21 <format property="timesimple" pattern="${time.simple.pattern}" />
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}/**" />
36 <attribute name="Built-By" value="${app.author}" />
37 <attribute name="Version" value="${app.version}" />
38 <attribute name="Built-Date" value="${timesimple}" />
43 <!-- ================================================= -->
45 <!-- Create the jar file in the dist directory -->
46 <!-- ================================================= -->
47 <target name="manox-jar" description="create jar file in dist directory">
48 <antcall target="build-splat-jar">
49 <param name="jar.name" value="manox"/>
53 <!-- ================================================= -->
55 <!-- Create the jar file in the dist directory -->
56 <!-- ================================================= -->
57 <target name="kernel-jar" description="create jar file in dist directory">
58 <antcall target="build-splat-jar">
59 <param name="jar.name" value="kernel"/>
63 <!-- ================================================= -->
65 <!-- Create the jar file in the dist directory -->
66 <!-- ================================================= -->
67 <target name="som-jar" description="create jar file in dist directory">
68 <antcall target="build-splat-jar">
69 <param name="jar.name" value="som"/>
73 <!-- ================================================= -->
76 <!-- ================================================= -->
77 <target name="jar" depends="kernel-jar,som-jar,manox-jar" description="compile and create the jar file in dist directory">
80 <!-- ================ Targets below are not yet used. ===================== -->
82 <!-- ================================================= -->
84 <!-- Compile and create the dist target -->
85 <!-- ================================================= -->
86 <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
90 <!-- ================================================= -->
92 <!-- Compile and create the dist target -->
93 <!-- ================================================= -->
94 <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
97 <!-- ================================================= -->
99 <!-- Clean the build directory -->
100 <!-- ================================================= -->
101 <target name="clean" description="clean the build directory">
102 <echo message="deleting files in ${splat.dist.dir}" />
103 <delete includeemptydirs="true" failonerror="false">
104 <fileset dir="${splat.dist.dir}" includes="**/*" />
106 <echo message="deleting files in ${splat.build.dir}" />
107 <delete includeemptydirs="true" failonerror="false">
108 <fileset dir="${splat.build.dir}" includes="**/*" />
112 <!-- ============================================================================ -->
113 <!-- help : display the help page -->
114 <!-- ============================================================================ -->
116 <java fork="no" classname="org.apache.tools.ant.Main">
117 <arg line="-projecthelp" />
121 <!-- ================================================= -->
123 <!-- Compile the sources file in build/classes -->
124 <!-- ================================================= -->
125 <target name="compile" description="compile source code">
126 <echo message="compiling SIMAN SALOME Platform" />
127 <echo message="compiler.max.memory : ${compiler.max.memory}" />
128 <echo message="build repository : ${splat.build.dir}" />
129 <echo message="splat.lib.dir : ${splat.lib.dir}" />
131 <mkdir dir="${splat.build.dir}" />
132 <mkdir dir="${splat.build.dir}/classes" />
133 <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}">
134 <src path="${splat.src.dir}" />
136 <path refid="dependencies.classpath" />
138 <exclude name="test/**" />
140 <copy todir="${splat.build.dir}/classes">
141 <fileset dir="${splat.src.dir}/conf">
143 <fileset dir="${splat.src.dir}/java">
144 <include name="com/**/*.xsd"/>
147 <mkdir dir="${splat.build.dir}/classes/META-INF" />
152 <!-- ================================================= -->
153 <!-- Compile tests -->
154 <!-- Compile the tests sources file in build/tests -->
155 <!-- ================================================= -->
156 <target name="compile-tests" description="compile source code">
157 <echo message="compiling splat tests classes" />
158 <echo message="compiler.max.memory : ${compiler.max.memory}" />
159 <echo message="build repository : ${splat.build.dir}" />
160 <echo message="splat.lib.dir : ${splat.lib.dir}" />
162 <mkdir dir="${splat.build.dir}" />
163 <mkdir dir="${splat.build.dir}/classes" />
164 <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}">
165 <src path="${splat.dir}/test" />
167 <path refid="dependencies.classpath" />
168 <path refid="test.libs.classpath" />
170 <include name="test/**" />
171 <exclude name="com/**" />
172 <exclude name="org/**" />