[20983] | 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>
|
---|
[20990] | 13 |
|
---|
[20983] | 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"/>
|
---|
[21217] | 28 | <property name="gsdlhome" value="${env.GSDL3SRCHOME}/gs2build"/>
|
---|
[20983] | 29 | <property name="tomcat.home" value="${gsdl3srchome}/packages/tomcat"/>
|
---|
| 30 | <property name="web.home" value="${basedir}/web"/>
|
---|
[20986] | 31 | <property name="derbydb.home" value="${basedir}/web/derbyDB"/>
|
---|
[20990] | 32 | <property name="webservices.home" value="${basedir}/web/WEB-INF/services"/>
|
---|
| 33 | <property name="webclasses.home" value="${basedir}/web/WEB-INF/classes"/>
|
---|
[20983] | 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-->
|
---|
[21247] | 48 | <copy file="${basedir}/VSprops.properties.in" tofile="${basedir}/VSprops.properties" overwrite="true">
|
---|
[20983] | 49 | <filterset>
|
---|
[21254] | 50 | <filter token="pharosishome" value="${basedir}"/>
|
---|
[21217] | 51 | <filter token="gsdlhome" value="${gsdlhome}"/>
|
---|
[21254] | 52 | <filter token="pharosos" value="${env.GSDLOS}"/>
|
---|
[20983] | 53 | <filter token="tomcat.server" value="${tomcat.server}"/>
|
---|
| 54 | <filter token="tomcat.port" value="${tomcat.port}"/>
|
---|
| 55 | </filterset>
|
---|
| 56 | </copy>
|
---|
[20986] | 57 |
|
---|
[20990] | 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 |
|
---|
[20986] | 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 |
|
---|
[20983] | 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 |
|
---|