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

Revision 20986, 2.7 KB (checked in by davidb, 10 years ago)

configure task now creates empty DB as well

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="tomcat.home" value="${gsdl3srchome}/packages/tomcat"/>
29  <property name="web.home" value="${basedir}/web"/>
30  <property name="cmdlineapi.home" value="${basedir}/cmdline-api-srcpack"/>
31  <property name="derbydb.home" value="${basedir}/web/derbyDB"/>
32
33  <target name="help" description="print a help message">
34    <echo message="  Execute 'ant -projecthelp' for a list of targets."/>
35    <echo message="  Execute 'ant -help' for Ant help."/>
36  </target>
37  <target name="configure" description="set up all the properties files etc">
38    <!-- set up the pharos tomcat context -->
39    <copy file="${basedir}/resources/tomcat/pharos.xml" tofile="${tomcat.home}/conf/Catalina/localhost/pharos.xml" overwrite="true">
40      <filterset>
41        <filter token="pharoswebhome" value="${web.home}"/>
42      </filterset>
43    </copy>
44
45    <!-- generate VSprops.properties from .in file-->
46    <copy file="${cmdlineapi.home}/VSprops.properties.in" tofile="${cmdlineapi.home}/VSprops.properties" overwrite="true">
47      <filterset>
48    <filter token="imageishome" value="${cmdlineapi.home}"/>
49    <filter token="iisos" value="${env.GSDLOS}"/>
50    <filter token="tomcat.server" value="${tomcat.server}"/>
51    <filter token="tomcat.port" value="${tomcat.port}"/>
52      </filterset>
53    </copy>
54
55    <!-- generate empty DB if one does not already exist -->
56
57    <copy todir="${derbydb.home}/gsImageSearchDB" overwrite="false">
58      <fileset dir="${derbydb.home}/gsImageSearchDB.empty"/>
59    </copy>
60
61    <mkdir dir="/tmp/vstmpdir"/>
62    <mkdir dir="/tmp/vsupload"/>
63  </target>
64
65  <target name="display">
66    <echo>gsdl3home ${gsdl3srchome}</echo>
67    <echo> tomcat port: ${tomcat.port}</echo>
68    <echo> tomcat url: ${tomcat.server}</echo>
69  </target>
70</project>
71
72
73
Note: See TracBrowser for help on using the browser.