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

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

Removed some debug statements

  • Property svn:executable set to *
File size: 4.7 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 dir="${mat.build}"/>
48 <delete dir="${mat.lib}"/>
49 <delete dir="${mat.web.scripts}"/>
50 <delete dir="${mat.webinf.lib}"/>
51 <delete dir="${mat.webinf.classes}"/>
52 </target>
53
54 <target name="compile" depends="setup-java-lib,setup-tmp,create_log_folder,move-mat-xml">
55 <mkdir dir="${mat.classes}"/>
56 <javac srcdir="${mat.src}" destdir="${mat.classes}" classpathref="classpath"/>
57
58 <mkdir dir="${mat.webinf.classes}"/>
59 <copy file="${gs.webinf.classes}/global.properties" tofile="${mat.webinf.classes}/global.properties"/>
60
61 <mkdir dir="${mat.web.scripts}"/>
62 <copy todir="${mat.web.scripts}">
63 <fileset dir="${mat.bin.scripts}"/>
64 </copy>
65
66 <mkdir dir="${mat.webinf.lib}"/>
67 <jar destfile="${mat.webinf.lib}/mat.jar">
68 <fileset dir="${mat.classes}">
69 <include name="${mat.main.classes}/**"/>
70 </fileset>
71 </jar>
72
73 <jar destfile="guiext.jar">
74 <fileset dir="${mat.classes}">
75 <include name="${mat.admin.classes}/**"/>
76 </fileset>
77 </jar>
78 </target>
79
80 <target name="move-mat-xml">
81 <copy file="${mat.tomcat.resources}/mat.xml" tofile="${tomcat.localhost}/mat.xml" overwrite="true">
82 <filterset>
83 <filter token="matwebhome" value="${basedir}/web"/>
84 </filterset>
85 </copy>
86 </target>
87
88 <target name="setup-java-lib">
89
90 <mkdir dir="${mat.lib}"/>
91 <copy todir="${mat.lib}">
92 <fileset dir="${gs.webinf.lib}">
93 <include name="**/*.jar"/>
94 </fileset>
95 </copy>
96
97 <mkdir dir="${mat.lib}"/>
98 <copy todir="${mat.lib}">
99 <fileset dir="${gs.webinf.classes}"/>
100 </copy>
101
102 <copy todir="${mat.lib}">
103 <fileset dir="${gs.jni}">
104 <include name="**/*.jar"/>
105 </fileset>
106 </copy>
107
108 <copy todir="${mat.lib}">
109 <fileset dir="${tomcat.lib}">
110 <include name="**/servlet-api.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> ${mat.tmp} has been removed </echo>
137 </target>
138 <target name ="setup-tmp">
139 <mkdir dir="./tmp"/>
140 <echo> ${mat.tmp} 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.