root/gs3-extensions/pharos/trunk/build.xml @ 21254

Revision 21254, 3.5 KB (checked in by davidb, 10 years ago)

Switch from using imageishome to pharosishome

Line 
1<?xml version="1.0"?>
2<project name="pharos" basedir="." default="help">
3
4  <!-- ??? whats the best way to get this???-->
5  <property name="gsdl3srchome" value="../.."/>
6
7  <!-- ============ classpath =================== -->
8 <path id="project.classpath">
9    <fileset dir="${gsdl3srchome}/lib/java">
10      <include name="**/*.jar"/>
11    </fileset>
12  </path>
13
14  <!-- ============ self defined tasks =================== --> 
15<taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
16  <!-- create build.properties if it has not been created yet -->
17<!--  <if>
18    <bool><not><available file="build.properties"/></not></bool>
19    <copy file="build.properties.in" tofile="build.properties"/>
20  </if>-->
21  <!-- now use the properties -->
22  <property file="build.properties"/>
23  <!-- get top level properties - or will we be running this from top level??-->
24  <property file="${gsdl3srchome}/build.properties"/>
25
26  <!-- get properties from the environment -->
27  <property environment="env"/>
28  <property name="gsdlhome" value="${env.GSDL3SRCHOME}/gs2build"/>
29  <property name="tomcat.home" value="${gsdl3srchome}/packages/tomcat"/>
30  <property name="web.home" value="${basedir}/web"/>
31  <property name="derbydb.home" value="${basedir}/web/derbyDB"/>
32  <property name="webservices.home" value="${basedir}/web/WEB-INF/services"/>
33  <property name="webclasses.home" value="${basedir}/web/WEB-INF/classes"/>
34
35  <target name="help" description="print a help message">
36    <echo message="  Execute 'ant -projecthelp' for a list of targets."/>
37    <echo message="  Execute 'ant -help' for Ant help."/>
38  </target>
39  <target name="configure" description="set up all the properties files etc">
40    <!-- set up the pharos tomcat context -->
41    <copy file="${basedir}/resources/tomcat/pharos.xml" tofile="${tomcat.home}/conf/Catalina/localhost/pharos.xml" overwrite="true">
42      <filterset>
43        <filter token="pharoswebhome" value="${web.home}"/>
44      </filterset>
45    </copy>
46
47    <!-- generate VSprops.properties from .in file-->
48    <copy file="${basedir}/VSprops.properties.in" tofile="${basedir}/VSprops.properties" overwrite="true">
49      <filterset>
50    <filter token="pharosishome" value="${basedir}"/>
51    <filter token="gsdlhome" value="${gsdlhome}"/>
52    <filter token="pharosos" value="${env.GSDLOS}"/>
53    <filter token="tomcat.server" value="${tomcat.server}"/>
54    <filter token="tomcat.port" value="${tomcat.port}"/>
55      </filterset>
56    </copy>
57
58    <!-- generate CBSE.properties from .in file-->
59    <copy file="${webservices.home}/CBSE.properties.in" tofile="${webservices.home}/CBSE.properties" overwrite="true">
60      <filterset>
61    <filter token="tomcat.server" value="${tomcat.server}"/>
62    <filter token="tomcat.port" value="${tomcat.port}"/>
63      </filterset>
64    </copy>
65
66    <!-- generate log4j.properties from .in file-->
67    <copy file="${webclasses.home}/log4j.properties.in" tofile="${webclasses.home}/log4j.properties" overwrite="true">
68      <filterset>
69    <filter token="tomcathome" value="${tomcat.home}"/>
70      </filterset>
71    </copy>
72
73
74    <!-- generate empty DB if one does not already exist -->
75
76    <copy todir="${derbydb.home}/gsImageSearchDB" overwrite="false">
77      <fileset dir="${derbydb.home}/gsImageSearchDB.empty"/>
78    </copy>
79
80    <mkdir dir="/tmp/vstmpdir"/>
81    <mkdir dir="/tmp/vsupload"/>
82  </target>
83
84  <target name="display">
85    <echo>gsdl3home ${gsdl3srchome}</echo>
86    <echo> tomcat port: ${tomcat.port}</echo>
87    <echo> tomcat url: ${tomcat.server}</echo>
88  </target>
89</project>
90
91
92
Note: See TracBrowser for help on using the browser.