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

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

new ant build file

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