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" />
22 <path id="dependencies.classpath">
23 <fileset dir="${tomcat.war.build.dir}">
24 <include name="**/*.*"/>
30 slf4j-log4j12-1.6.1.jar
35 <pathelement location="${splat.lib.dir}/activation.jar" />
36 <pathelement location="${splat.lib.dir}/antlr-2.7.6.jar" />
37 <pathelement location="${splat.lib.dir}/commons-collections-3.1.jar" />
38 <pathelement location="${splat.lib.dir}/dom4j-1.6.1.jar" />
39 <pathelement location="${splat.lib.dir}/hibernate-3.5.jar" />
40 <pathelement location="${splat.lib.dir}/javassist-3.9.0.GA.jar" />
41 <pathelement location="${splat.lib.dir}/jta-1.1.jar" />
42 <pathelement location="${splat.lib.dir}/log4j-1.2.15.jar" />
43 <pathelement location="${splat.lib.dir}/lucene-core-2.9.2.jar" />
44 <pathelement location="${splat.lib.dir}/lucene-queries-2.9.2.jar" />
45 <pathelement location="${splat.lib.dir}/mailapi.jar" />
46 <pathelement location="${splat.lib.dir}/mysql-connector-java-5.1.5-bin.jar" />
47 <pathelement location="${splat.lib.dir}/" />
48 <pathelement location="${splat.lib.dir}/poi-3.7-20101029.jar" />
49 <pathelement location="${splat.lib.dir}/poi-ooxml-3.7-20101029.jar" />
50 <pathelement location="${splat.lib.dir}/poi-ooxml-schemas-3.7-20101029.jar" />
51 <pathelement location="${splat.lib.dir}/poi-scratchpad-3.7-20101029.jar" />
52 <pathelement location="${splat.lib.dir}/" />
53 <pathelement location="${splat.lib.dir}/" />
54 <pathelement location="${splat.lib.dir}/" />
55 <pathelement location="${splat.lib.dir}/" />
56 <pathelement location="${splat.lib.dir}/" />
57 <pathelement location="${splat.lib.dir}/" />-->
60 <path id="test.libs.classpath">
61 <pathelement location="${splat.lib.dir}/testng/testng-5.8-jdk15.jar" />
62 <pathelement location="${splat.lib.dir}/spring/spring-test.jar" />
66 <property name="time.simple.pattern" value="dd/MM/yyyy" />
68 <format property="timesimple" pattern="${time.simple.pattern}" />
71 <!-- ================================================= -->
73 <!-- Compile the sources file in build/classes -->
74 <!-- ================================================= -->
75 <target name="compile" description="compile source code">
76 <echo message="compiling framework" />
77 <echo message="compiler.max.memory : ${compiler.max.memory}" />
78 <echo message="build repository : ${framework.build.dir}" />
79 <echo message="splat.lib.dir : ${splat.lib.dir}" />
81 <mkdir dir="${framework.build.dir}" />
82 <mkdir dir="${framework.build.dir}/classes" />
83 <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}">
84 <src path="${framework.src.dir}/java" />
86 <path refid="server.classpath" />
87 <path refid="dependencies.classpath" />
89 <exclude name="test/**" />
91 <copy todir="${framework.build.dir}/classes">
92 <fileset dir="${framework.src.dir}/conf">
94 <fileset dir="${framework.src.dir}/java">
95 <include name="com/**/*.xsd"/>
98 <mkdir dir="${framework.build.dir}/classes/META-INF" />
103 <!-- ================================================= -->
104 <!-- Compile tests -->
105 <!-- Compile the tests sources file in build/tests -->
106 <!-- ================================================= -->
107 <target name="compile-tests" description="compile source code">
108 <echo message="compiling framework tests classes" />
109 <echo message="compiler.max.memory : ${compiler.max.memory}" />
110 <echo message="build repository : ${framework.build.dir}" />
111 <echo message="splat.lib.dir : ${splat.lib.dir}" />
113 <mkdir dir="${framework.build.dir}" />
114 <mkdir dir="${framework.build.dir}/classes" />
115 <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}">
116 <src path="${framework.dir}/test" />
118 <path refid="server.classpath" />
119 <path refid="dependencies.classpath" />
120 <path refid="test.libs.classpath" />
122 <include name="test/**" />
123 <exclude name="com/**" />
124 <exclude name="org/**" />
130 <!-- ================================================= -->
132 <!-- Create the jar file in the dist directory -->
133 <!-- ================================================= -->
134 <target name="jar" description="create jar file in dist directory">
135 <mkdir dir="${framework.dist.dir}" />
136 <jar destfile="${framework.dist.dir}/${framework.jar.name}">
137 <zipfileset dir="${framework.build.dir}/classes">
138 <include name="**" />
139 <exclude name="test" />
142 <attribute name="Built-By" value="EURIWARE" />
143 <attribute name="Version" value="${app.version}" />
144 <attribute name="Built-Date" value="${timesimple}" />
149 <!-- ================================================= -->
151 <!-- Compile and create the dist target -->
152 <!-- ================================================= -->
153 <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
157 <!-- ================================================= -->
159 <!-- Compile and create the dist target -->
160 <!-- ================================================= -->
161 <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
164 <!-- ================================================= -->
166 <!-- Clean the build directory -->
167 <!-- ================================================= -->
168 <target name="clean" description="clean the build directory">
169 <echo message="deleting files in ${framework.dist.dir}" />
170 <delete includeemptydirs="true" failonerror="false">
171 <fileset dir="${framework.dist.dir}" includes="**/*" />
173 <echo message="deleting files in ${framework.build.dir}" />
174 <delete includeemptydirs="true" failonerror="false">
175 <fileset dir="${framework.build.dir}" includes="**/*" />
179 <!-- ============================================================================ -->
180 <!-- help : display the help page -->
181 <!-- ============================================================================ -->
183 <java fork="no" classname="org.apache.tools.ant.Main">
184 <arg line="-projecthelp" />