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="server.classpath">
8 <pathelement location="${weblogic.home}/server/lib/weblogic.jar" />
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" />
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" />
33 <property name="time.simple.pattern" value="dd/MM/yyyy" />
35 <format property="timesimple" pattern="${time.simple.pattern}" />
38 <!-- ================================================= -->
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}" />
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" />
53 <path refid="server.classpath" />
54 <path refid="dependencies.classpath" />
56 <exclude name="test/**" />
58 <copy todir="${framework.build.dir}/classes">
59 <fileset dir="${framework.src.dir}/conf">
61 <fileset dir="${framework.src.dir}/java">
62 <include name="com/**/*.xsd"/>
65 <mkdir dir="${framework.build.dir}/classes/META-INF" />
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}" />
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" />
85 <path refid="server.classpath" />
86 <path refid="dependencies.classpath" />
87 <path refid="test.libs.classpath" />
89 <include name="test/**" />
90 <exclude name="com/**" />
91 <exclude name="org/**" />
97 <!-- ================================================= -->
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" />
109 <attribute name="Built-By" value="EURIWARE" />
110 <attribute name="Version" value="${app.version}" />
111 <attribute name="Built-Date" value="${timesimple}" />
116 <!-- ================================================= -->
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">
124 <!-- ================================================= -->
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">
131 <!-- ================================================= -->
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="**/*" />
140 <echo message="deleting files in ${framework.build.dir}" />
141 <delete includeemptydirs="true" failonerror="false">
142 <fileset dir="${framework.build.dir}" includes="**/*" />
146 <!-- ============================================================================ -->
147 <!-- help : display the help page -->
148 <!-- ============================================================================ -->
150 <java fork="no" classname="org.apache.tools.ant.Main">
151 <arg line="-projecthelp" />