root/gs3-extensions/mat/trunk/build.xml @ 22022

Revision 22022, 4.7 KB (checked in by sjm84, 10 years ago)

Removed some debug statements

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