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 <!-- ================================================= -->
26 <!-- Create the jar file in the dist directory -->
27 <!-- ================================================= -->
28 <target name="splat-manox-jar" description="create jar file in dist directory">
29 <mkdir dir="${splat.dist.dir}" />
30 <jar destfile="${splat.dist.dir}/${splat.manox.jar.name}" >
31 <zipfileset dir="${splat.bin.dir}/">
32 <include name="${source.splat-manox.jar}/**" />
35 <attribute name="Built-By" value="${app.author}" />
36 <attribute name="Version" value="${app.version}" />
37 <attribute name="Built-Date" value="${timesimple}" />
42 <!-- ================================================= -->
44 <!-- Create the jar file in the dist directory -->
45 <!-- ================================================= -->
46 <target name="splat-kernel-jar" description="create jar file in dist directory">
47 <mkdir dir="${splat.dist.dir}" />
48 <jar destfile="${splat.dist.dir}/${splat.kernel.jar.name}" >
49 <zipfileset dir="${splat.bin.dir}/">
50 <include name="${source.splat-kernel.jar}/**" />
53 <attribute name="Built-By" value="${app.author}" />
54 <attribute name="Version" value="${app.version}" />
55 <attribute name="Built-Date" value="${timesimple}" />
60 <!-- ================================================= -->
63 <!-- ================================================= -->
64 <target name="jar" depends="splat-kernel-jar,splat-manox-jar" description="compile and create the jar file in dist directory">
67 <!-- ================================================= -->
69 <!-- Compile and create the dist target -->
70 <!-- ================================================= -->
71 <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
75 <!-- ================================================= -->
77 <!-- Compile and create the dist target -->
78 <!-- ================================================= -->
79 <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
82 <!-- ================================================= -->
84 <!-- Clean the build directory -->
85 <!-- ================================================= -->
86 <target name="clean" description="clean the build directory">
87 <echo message="deleting files in ${splat.dist.dir}" />
88 <delete includeemptydirs="true" failonerror="false">
89 <fileset dir="${splat.dist.dir}" includes="**/*" />
91 <echo message="deleting files in ${splat.build.dir}" />
92 <delete includeemptydirs="true" failonerror="false">
93 <fileset dir="${splat.build.dir}" includes="**/*" />
97 <!-- ============================================================================ -->
98 <!-- help : display the help page -->
99 <!-- ============================================================================ -->
101 <java fork="no" classname="org.apache.tools.ant.Main">
102 <arg line="-projecthelp" />
106 <!-- ================================================= -->
108 <!-- Compile the sources file in build/classes -->
109 <!-- ================================================= -->
110 <target name="compile" description="compile source code">
111 <echo message="compiling SIMAN SALOME Platform" />
112 <echo message="compiler.max.memory : ${compiler.max.memory}" />
113 <echo message="build repository : ${splat.build.dir}" />
114 <echo message="splat.lib.dir : ${splat.lib.dir}" />
116 <mkdir dir="${splat.build.dir}" />
117 <mkdir dir="${splat.build.dir}/classes" />
118 <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}">
119 <src path="${splat.src.dir}" />
121 <path refid="dependencies.classpath" />
123 <exclude name="test/**" />
125 <copy todir="${splat.build.dir}/classes">
126 <fileset dir="${splat.src.dir}/conf">
128 <fileset dir="${splat.src.dir}/java">
129 <include name="com/**/*.xsd"/>
132 <mkdir dir="${splat.build.dir}/classes/META-INF" />
137 <!-- ================================================= -->
138 <!-- Compile tests -->
139 <!-- Compile the tests sources file in build/tests -->
140 <!-- ================================================= -->
141 <target name="compile-tests" description="compile source code">
142 <echo message="compiling splat tests classes" />
143 <echo message="compiler.max.memory : ${compiler.max.memory}" />
144 <echo message="build repository : ${splat.build.dir}" />
145 <echo message="splat.lib.dir : ${splat.lib.dir}" />
147 <mkdir dir="${splat.build.dir}" />
148 <mkdir dir="${splat.build.dir}/classes" />
149 <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}">
150 <src path="${splat.dir}/test" />
152 <path refid="dependencies.classpath" />
153 <path refid="test.libs.classpath" />
155 <include name="test/**" />
156 <exclude name="com/**" />
157 <exclude name="org/**" />