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

Last change on this file since 18215 was 18215, 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 </target>
43
44 <target name="setup-java-lib">
45
46 <mkdir dir="${lib.dir}"/>
47 <copy todir="${lib.dir}">
48 <fileset dir="${web.dir}/lib">
49 <include name="**/*.jar"/>
50 </fileset>
51 </copy>
52
53 <mkdir dir="${lib.dir}/classes"/>
54 <copy todir="${lib.dir}/classes">
55 <fileset dir="${web.dir}/classes"/>
56 </copy>
57
58 <copy todir="${lib.dir}">
59 <fileset dir="${jni.dir}">
60 <include name="**/*.jar"/>
61 </fileset>
62 </copy>
63
64 <copy todir="${lib.dir}">
65 <fileset dir="${tomcat.lib.dir}">
66 <include name="**/servlet-api.jar"/>
67 </fileset>
68 </copy>
69
70 <copy todir="${lib.dir}">
71 <fileset dir="${tomcat.endorsed.dir}">
72 <include name="**/xml-apis.jar"/>
73 </fileset>
74 </copy>
75
76 <copy todir="${lib.dir}">
77 <fileset dir="./">
78 <include name="**/${jcommon}"/>
79 <include name="**/${jfreechart}"/>
80 </fileset>
81 </copy>
82
83 <mkdir dir="${mat.dir}/script"/>
84 <copy todir="${mat.dir}/script">
85 <fileset dir="./resources/script"/>
86 </copy>
87
88 <mkdir dir="${web.class.dir}"/>
89 <copy todir="${web.class.dir}">
90 <fileset dir="${mat.class.dir}">
91 <include name="**/*.class"/>
92 </fileset>
93 </copy>
94
95 </target>
96
97 <target name ="clean-tmp">
98 <delete dir="${tmp.dir}"/>
99 <echo> ${tmp.dir} has been removed </echo>
100 </target>
101 <target name ="setup-tmp">
102 <mkdir dir="./tmp"/>
103 <echo> ${tmp.dir} has been created </echo>
104 <echo file="${tmp.dir}/log.txt">This is the log file.</echo>
105 </target>
106 <target name="clean-compile" depends="clean,compile"/>
107</project>
Note: See TracBrowser for help on using the repository browser.