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

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

Tidied up the build.xml file and it now copies the mat/lib directory to mat/web/WEB-INF/lib directory

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