source: other-projects/trunk/greenstone3-extension/mat/build.xml@ 18216

Last change on this file since 18216 was 18216, checked in by cc108, 12 years ago

add new target to copy servlet class to WEB-INF\class folder

  • Property svn:executable set to *
File size: 3.3 KB
Line 
1<project name="Mat" basedir="." default="main">
2
3 <property name="src.dir" value="src"/>
4 <property name="build.dir" value="build"/>
5 <property name="classes.dir" value="${build.dir}/classes"/>
6 <property name="jar.dir" value="${build.dir}/jar"/>
7 <property name="main-class" value="org.greenstone3.gsdl3_extension.mat.CollectionChooser"/>
8 <property name="lib.dir" value="lib"/>
9 <property name="tmp.dir" value="tmp"/>
10 <property name="web.dir" value="../../web/WEB-INF"/>
11 <property name="jcommon" value="jcommon.jar"/>
12 <property name="jfreechart" value="jfreechart.jar"/>
13 <property name="mat.dir" value="../../web/mat"/>
14 <property name="jni.dir" value="../../lib/jni"/>
15 <property name="tomcat.lib.dir" value="../../packages/tomcat/common/lib"/>
16 <property name="tomcat.endorsed.dir" value="../../packages/tomcat/common/endorsed"/>
17 <property name="web.class.dir" value="../../web/WEB-INF/classes/org/greenstone/gsdl3_extension/mat/servlet"/>
18 <property name="mat.class.dir" value ="${classes.dir}/org/greenstone/gsdl3_extension/mat/servlet"/>
19
20
21 <path id="classpath">
22 <fileset dir="${lib.dir}">
23 <include name="**/*.jar"/>
24 </fileset>
25 <dirset dir="${lib.dir}">
26 <include name="**/classes"/>
27 </dirset>
28 </path>
29
30 <target name ="create_log_folder">
31 <mkdir dir="../logs/mat"/>
32 </target>
33
34 <target name="clean">
35 <delete dir="${build.dir}"/>
36 <delete dir="${lib.dir}"/>
37 </target>
38
39 <target name="compile" depends="setup-java-lib,setup-tmp,create_log_folder">
40 <mkdir dir="${classes.dir}"/>
41 <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
42
43 <mkdir dir="${web.class.dir}"/>
44 <copy todir="${web.class.dir}">
45 <fileset dir="${mat.class.dir}">
46 <include name="**/*.class"/>
47 </fileset>
48 </copy>
49 </target>
50
51 <target name="setup-java-lib">
52
53 <mkdir dir="${lib.dir}"/>
54 <copy todir="${lib.dir}">
55 <fileset dir="${web.dir}/lib">
56 <include name="**/*.jar"/>
57 </fileset>
58 </copy>
59
60 <mkdir dir="${lib.dir}/classes"/>
61 <copy todir="${lib.dir}/classes">
62 <fileset dir="${web.dir}/classes"/>
63 </copy>
64
65 <copy todir="${lib.dir}">
66 <fileset dir="${jni.dir}">
67 <include name="**/*.jar"/>
68 </fileset>
69 </copy>
70
71 <copy todir="${lib.dir}">
72 <fileset dir="${tomcat.lib.dir}">
73 <include name="**/servlet-api.jar"/>
74 </fileset>
75 </copy>
76
77 <copy todir="${lib.dir}">
78 <fileset dir="${tomcat.endorsed.dir}">
79 <include name="**/xml-apis.jar"/>
80 </fileset>
81 </copy>
82
83 <copy todir="${lib.dir}">
84 <fileset dir="./">
85 <include name="**/${jcommon}"/>
86 <include name="**/${jfreechart}"/>
87 </fileset>
88 </copy>
89
90 <mkdir dir="${mat.dir}/script"/>
91 <copy todir="${mat.dir}/script">
92 <fileset dir="./resources/script"/>
93 </copy>
94 </target>
95
96 <target name ="clean-tmp">
97 <delete dir="${tmp.dir}"/>
98 <echo> ${tmp.dir} has been removed </echo>
99 </target>
100 <target name ="setup-tmp">
101 <mkdir dir="./tmp"/>
102 <echo> ${tmp.dir} has been created </echo>
103 <echo file="${tmp.dir}/log.txt">This is the log file.</echo>
104 </target>
105 <target name="clean-compile" depends="clean,compile"/>
106</project>
Note: See TracBrowser for help on using the repository browser.