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 <pathelement location="${splat.lib.dir}/commons/commons-logging-1.1.1.jar" />
9 <pathelement location="${splat.lib.dir}/commons/commons-lang-2.3.jar" />
10 <pathelement location="${splat.lib.dir}/commons/commons-io-1.4.jar" />
11 <pathelement location="${splat.lib.dir}/struts2/struts2-core-2.0.11.1.jar" />
12 <pathelement location="${splat.lib.dir}/struts2/xwork-2.0.4.jar" />
13 <pathelement location="${splat.lib.dir}/displaytag/displaytag-hw-ext.jar" />
14 <pathelement location="${splat.lib.dir}/displaytag/displaytag-export-poi-1.1.1.jar" />
15 <pathelement location="${splat.lib.dir}/spring/spring.jar" />
16 <pathelement location="${splat.lib.dir}/beanlib/beanlib-5.0.1beta.jar" />
17 <pathelement location="${splat.lib.dir}/springsecurity/spring-security-core-2.0.2.jar" />
18 <pathelement location="${splat.lib.dir}/htmlparser/htmllexer.jar" />
19 <pathelement location="${splat.lib.dir}/htmlparser/htmlparser.jar" />
20 <pathelement location="${splat.lib.dir}/log4j/log4j-1.2.14.jar" />
23 <path id="test.libs.classpath">
24 <pathelement location="${splat.lib.dir}/testng/testng-5.8-jdk15.jar" />
25 <pathelement location="${splat.lib.dir}/spring/spring-test.jar" />
29 <property name="time.simple.pattern" value="dd/MM/yyyy" />
31 <format property="timesimple" pattern="${time.simple.pattern}" />
34 <!-- ================================================= -->
36 <!-- Compile the sources file in build/classes -->
37 <!-- ================================================= -->
38 <target name="compile" description="compile source code">
39 <echo message="compiling framework" />
40 <echo message="compiler.max.memory : ${compiler.max.memory}" />
41 <echo message="build repository : ${framework.build.dir}" />
42 <echo message="splat.lib.dir : ${splat.lib.dir}" />
44 <mkdir dir="${framework.build.dir}" />
45 <mkdir dir="${framework.build.dir}/classes" />
46 <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}">
47 <src path="${framework.src.dir}/java" />
49 <path refid="server.classpath" />
50 <path refid="dependencies.classpath" />
52 <exclude name="test/**" />
54 <copy todir="${framework.build.dir}/classes">
55 <fileset dir="${framework.src.dir}/conf">
57 <fileset dir="${framework.src.dir}/java">
58 <include name="com/**/*.xsd"/>
61 <mkdir dir="${framework.build.dir}/classes/META-INF" />
66 <!-- ================================================= -->
67 <!-- Compile tests -->
68 <!-- Compile the tests sources file in build/tests -->
69 <!-- ================================================= -->
70 <target name="compile-tests" description="compile source code">
71 <echo message="compiling framework tests classes" />
72 <echo message="compiler.max.memory : ${compiler.max.memory}" />
73 <echo message="build repository : ${framework.build.dir}" />
74 <echo message="splat.lib.dir : ${splat.lib.dir}" />
76 <mkdir dir="${framework.build.dir}" />
77 <mkdir dir="${framework.build.dir}/classes" />
78 <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}">
79 <src path="${framework.dir}/test" />
81 <path refid="server.classpath" />
82 <path refid="dependencies.classpath" />
83 <path refid="test.libs.classpath" />
85 <include name="test/**" />
86 <exclude name="com/**" />
87 <exclude name="org/**" />
93 <!-- ================================================= -->
95 <!-- Create the jar file in the dist directory -->
96 <!-- ================================================= -->
97 <target name="jar" description="create jar file in dist directory">
98 <mkdir dir="${framework.dist.dir}" />
99 <jar destfile="${framework.dist.dir}/${framework.jar.name}">
100 <zipfileset dir="${framework.build.dir}/classes">
101 <include name="**" />
102 <exclude name="test" />
105 <attribute name="Built-By" value="EURIWARE" />
106 <attribute name="Version" value="${app.version}" />
107 <attribute name="Built-Date" value="${timesimple}" />
112 <!-- ================================================= -->
114 <!-- Compile and create the dist target -->
115 <!-- ================================================= -->
116 <target name="build" depends="compile,jar" description="compile and create the jar file in dist directory">
120 <!-- ================================================= -->
122 <!-- Compile and create the dist target -->
123 <!-- ================================================= -->
124 <target name="rebuild" depends="clean,compile,jar" description="clean, compile and create the jar file in dist directory">
127 <!-- ================================================= -->
129 <!-- Clean the build directory -->
130 <!-- ================================================= -->
131 <target name="clean" description="clean the build directory">
132 <echo message="deleting files in ${framework.dist.dir}" />
133 <delete includeemptydirs="true" failonerror="false">
134 <fileset dir="${framework.dist.dir}" includes="**/*" />
136 <echo message="deleting files in ${framework.build.dir}" />
137 <delete includeemptydirs="true" failonerror="false">
138 <fileset dir="${framework.build.dir}" includes="**/*" />
142 <!-- ============================================================================ -->
143 <!-- help : display the help page -->
144 <!-- ============================================================================ -->
146 <java fork="no" classname="org.apache.tools.ant.Main">
147 <arg line="-projecthelp" />