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

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

ant clean now removes the mat.xml from the tomcat localhost directory

  • Property svn:executable set to *
File size: 4.8 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" value="${mat.build}/classes"/>
11 <property name="mat.classes.base" value="org/greenstone"/>
12 <property name="mat.admin.classes" value="${mat.classes.base}/admin"/>
13 <property name="mat.main.classes" value="${mat.classes.base}/mat"/>
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 file="guiext.jar"/>
47 <delete file="${tomcat.localhost}/mat.xml"/>
48 <delete dir="${mat.build}"/>
49 <delete dir="${mat.lib}"/>
50 <delete dir="${mat.web.scripts}"/>
51 <delete dir="${mat.webinf.lib}"/>
52 <delete dir="${mat.webinf.classes}"/>
53 </target>
54
55 <target name="compile" depends="setup-java-lib,setup-tmp,create_log_folder,move-mat-xml">
56 <mkdir dir="${mat.classes}"/>
57 <javac srcdir="${mat.src}" destdir="${mat.classes}" classpathref="classpath"/>
58
59 <mkdir dir="${mat.webinf.classes}"/>
60 <copy file="${gs.webinf.classes}/global.properties" tofile="${mat.webinf.classes}/global.properties"/>
61
62 <mkdir dir="${mat.web.scripts}"/>
63 <copy todir="${mat.web.scripts}">
64 <fileset dir="${mat.bin.scripts}"/>
65 </copy>
66
67 <mkdir dir="${mat.webinf.lib}"/>
68 <jar destfile="${mat.webinf.lib}/mat.jar">
69 <fileset dir="${mat.classes}">
70 <include name="${mat.main.classes}/**"/>
71 </fileset>
72 </jar>
73
74 <jar destfile="guiext.jar">
75 <fileset dir="${mat.classes}">
76 <include name="${mat.admin.classes}/**"/>
77 </fileset>
78 </jar>
79 </target>
80
81 <target name="move-mat-xml">
82 <copy file="${mat.tomcat.resources}/mat.xml" tofile="${tomcat.localhost}/mat.xml" overwrite="true">
83 <filterset>
84 <filter token="matwebhome" value="${basedir}/web"/>
85 </filterset>
86 </copy>
87 </target>
88
89 <target name="setup-java-lib">
90
91 <mkdir dir="${mat.lib}"/>
92 <copy todir="${mat.lib}">
93 <fileset dir="${gs.webinf.lib}">
94 <include name="**/*.jar"/>
95 </fileset>
96 </copy>
97
98 <mkdir dir="${mat.lib}"/>
99 <copy todir="${mat.lib}">
100 <fileset dir="${gs.webinf.classes}"/>
101 </copy>
102
103 <copy todir="${mat.lib}">
104 <fileset dir="${gs.jni}">
105 <include name="**/*.jar"/>
106 </fileset>
107 </copy>
108
109 <copy todir="${mat.lib}">
110 <fileset dir="${tomcat.lib}">
111 <include name="**/servlet-api.jar"/>
112 </fileset>
113 </copy>
114
115 <copy todir="${mat.lib}">
116 <fileset dir="./">
117 <include name="jcommon.jar"/>
118 <include name="jfreechart.jar"/>
119 </fileset>
120 </copy>
121
122 <mkdir dir="${mat.webinf.lib}"/>
123 <copy todir="${mat.webinf.lib}">
124 <fileset dir="${mat.lib}">
125 <include name="**"/>
126 </fileset>
127 </copy>
128
129 <mkdir dir="${mat.web.scripts}"/>
130 <copy todir="${mat.web.scripts}">
131 <fileset dir="${mat.script.resources}"/>
132 </copy>
133 </target>
134
135 <target name ="clean-tmp">
136 <delete dir="${mat.tmp}"/>
137 <echo> ${mat.tmp} has been removed </echo>
138 </target>
139 <target name ="setup-tmp">
140 <mkdir dir="./tmp"/>
141 <echo> ${mat.tmp} has been created </echo>
142 <echo file="${mat.tmp}/log.txt">This is the log file.</echo>
143 </target>
144 <target name="clean-compile" depends="clean,compile"/>
145
146</project>
Note: See TracBrowser for help on using the repository browser.