source: gs3-extensions/mat/trunk/build.xml@ 21941

Last change on this file since 21941 was 21941, checked in by sjm84, 11 years ago

Tidied and modified Mat's build.xml file, it also now creates a mat.jar in /web/WEB-INF/lib and creates a guiext.jar file in the top level

  • Property svn:executable set to *
File size: 3.8 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="lib.dir" value="lib"/>
7 <property name="tmp.dir" value="tmp"/>
8 <property name="gsdl3srchome.dir" value="../.."/>
9 <property name="web.dir" value="${gsdl3srchome.dir}/web/WEB-INF"/>
10 <property name="jcommon" value="jcommon.jar"/>
11 <property name="jfreechart" value="jfreechart.jar"/>
12 <property name="mat.dir" value="${gsdl3srchome.dir}/web/mat"/>
13 <property name="jni.dir" value="${gsdl3srchome.dir}/lib/jni"/>
14 <property name="tomcat.home" value="${gsdl3srchome.dir}/packages/tomcat"/>
15 <property name="tomcat.lib.dir" value="${tomcat.home}/common/lib"/>
16 <property name="tomcat.endorsed.dir" value="${tomcat.home}/common/endorsed"/>
17 <property name="web.class.dir" value="${web.dir}/classes/org/greenstone/mat/servlet"/>
18 <property name="mat.class.dir" value="${classes.dir}/org/greenstone/mat/servlet"/>
19
20 <path id="classpath">
21 <fileset dir="${lib.dir}">
22 <include name="**/*.jar"/>
23 </fileset>
24 <dirset dir="${lib.dir}">
25 <include name="**/classes"/>
26 </dirset>
27 </path>
28
29 <target name ="create_log_folder">
30 <mkdir dir="../logs/mat"/>
31 </target>
32
33 <target name="clean">
34 <delete dir="${build.dir}"/>
35 <delete dir="${lib.dir}"/>
36 </target>
37
38 <target name="compile" depends="setup-java-lib,setup-tmp,create_log_folder,move-mat-xml">
39 <mkdir dir="${classes.dir}"/>
40 <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
41
42 <mkdir dir="${web.class.dir}"/>
43 <copy todir="${web.class.dir}">
44 <fileset dir="${mat.class.dir}">
45 <include name="**/*.class"/>
46 </fileset>
47 </copy>
48 <jar destfile="web/WEB-INF/lib/mat.jar">
49 <fileset dir="build/classes">
50 <include name="org/greenstone/mat/**"/>
51 </fileset>
52 </jar>
53 <jar destfile="guiext.jar">
54 <fileset dir="build/classes">
55 <include name="org/greenstone/admin/**"/>
56 </fileset>
57 </jar>
58 </target>
59
60 <target name="move-mat-xml">
61 <copy file="${basedir}/resources/tomcat/mat.xml" tofile="${tomcat.home}/conf/Catalina/localhost/mat.xml" overwrite="true">
62 <filterset>
63 <filter token="matwebhome" value="${basedir}/web"/>
64 </filterset>
65 </copy>
66 </target>
67
68 <target name="setup-java-lib">
69
70 <mkdir dir="${lib.dir}"/>
71 <copy todir="${lib.dir}">
72 <fileset dir="${web.dir}/lib">
73 <include name="**/*.jar"/>
74 </fileset>
75 </copy>
76
77 <mkdir dir="${lib.dir}/classes"/>
78 <copy todir="${lib.dir}/classes">
79 <fileset dir="${web.dir}/classes"/>
80 </copy>
81
82 <copy todir="${lib.dir}">
83 <fileset dir="${jni.dir}">
84 <include name="**/*.jar"/>
85 </fileset>
86 </copy>
87
88 <copy todir="${lib.dir}">
89 <fileset dir="${tomcat.lib.dir}">
90 <include name="**/servlet-api.jar"/>
91 </fileset>
92 </copy>
93
94 <copy todir="${lib.dir}">
95 <fileset dir="${tomcat.endorsed.dir}">
96 <include name="**/xml-apis.jar"/>
97 </fileset>
98 </copy>
99
100 <copy todir="${lib.dir}">
101 <fileset dir="./">
102 <include name="**/${jcommon}"/>
103 <include name="**/${jfreechart}"/>
104 </fileset>
105 </copy>
106
107 <mkdir dir="${mat.dir}/script"/>
108 <copy todir="${mat.dir}/script">
109 <fileset dir="./resources/script"/>
110 </copy>
111 </target>
112
113 <target name ="clean-tmp">
114 <delete dir="${tmp.dir}"/>
115 <echo> ${tmp.dir} has been removed </echo>
116 </target>
117 <target name ="setup-tmp">
118 <mkdir dir="./tmp"/>
119 <echo> ${tmp.dir} has been created </echo>
120 <echo file="${tmp.dir}/log.txt">This is the log file.</echo>
121 </target>
122 <target name="clean-compile" depends="clean,compile"/>
123
124</project>
Note: See TracBrowser for help on using the repository browser.