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

Last change on this file since 18217 was 18217, 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: 2.9 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
18
19 <path id="classpath">
20 <fileset dir="${lib.dir}">
21 <include name="**/*.jar"/>
22 </fileset>
23 <dirset dir="${lib.dir}">
24 <include name="**/classes"/>
25 </dirset>
26 </path>
27
28 <target name ="create_log_folder">
29 <mkdir dir="../logs/mat"/>
30 </target>
31
32 <target name="clean">
33 <delete dir="${build.dir}"/>
34 <delete dir="${lib.dir}"/>
35 </target>
36
37 <target name="compile" depends="setup-java-lib,setup-tmp,create_log_folder">
38 <mkdir dir="${classes.dir}"/>
39 <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
40 </target>
41
42 <target name="setup-java-lib">
43
44 <mkdir dir="${lib.dir}"/>
45 <copy todir="${lib.dir}">
46 <fileset dir="${web.dir}/lib">
47 <include name="**/*.jar"/>
48 </fileset>
49 </copy>
50
51 <mkdir dir="${lib.dir}/classes"/>
52 <copy todir="${lib.dir}/classes">
53 <fileset dir="${web.dir}/classes"/>
54 </copy>
55
56 <copy todir="${lib.dir}">
57 <fileset dir="${jni.dir}">
58 <include name="**/*.jar"/>
59 </fileset>
60 </copy>
61
62 <copy todir="${lib.dir}">
63 <fileset dir="${tomcat.lib.dir}">
64 <include name="**/servlet-api.jar"/>
65 </fileset>
66 </copy>
67
68 <copy todir="${lib.dir}">
69 <fileset dir="${tomcat.endorsed.dir}">
70 <include name="**/xml-apis.jar"/>
71 </fileset>
72 </copy>
73
74 <copy todir="${lib.dir}">
75 <fileset dir="./">
76 <include name="**/${jcommon}"/>
77 <include name="**/${jfreechart}"/>
78 </fileset>
79 </copy>
80
81 <mkdir dir="${mat.dir}/script"/>
82 <copy todir="${mat.dir}/script">
83 <fileset dir="./resources/script"/>
84 </copy>
85 </target>
86
87 <target name ="clean-tmp">
88 <delete dir="${tmp.dir}"/>
89 <echo> ${tmp.dir} has been removed </echo>
90 </target>
91 <target name ="setup-tmp">
92 <mkdir dir="./tmp"/>
93 <echo> ${tmp.dir} has been created </echo>
94 <echo file="${tmp.dir}/log.txt">This is the log file.</echo>
95 </target>
96 <target name="clean-compile" depends="clean,compile"/>
97
98</project>
Note: See TracBrowser for help on using the repository browser.