[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="../.."/>
|
---|
[21258] | 6 | <property name="gsdl3home" value="../../web"/>
|
---|
[20983] | 7 |
|
---|
| 8 | <!-- ============ classpath =================== -->
|
---|
| 9 | <path id="project.classpath">
|
---|
| 10 | <fileset dir="${gsdl3srchome}/lib/java">
|
---|
| 11 | <include name="**/*.jar"/>
|
---|
| 12 | </fileset>
|
---|
| 13 | </path>
|
---|
[20990] | 14 |
|
---|
[20983] | 15 | <!-- ============ self defined tasks =================== -->
|
---|
| 16 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
| 17 | <!-- create build.properties if it has not been created yet -->
|
---|
| 18 | <!-- <if>
|
---|
| 19 | <bool><not><available file="build.properties"/></not></bool>
|
---|
| 20 | <copy file="build.properties.in" tofile="build.properties"/>
|
---|
| 21 | </if>-->
|
---|
| 22 | <!-- now use the properties -->
|
---|
| 23 | <property file="build.properties"/>
|
---|
| 24 | <!-- get top level properties - or will we be running this from top level??-->
|
---|
| 25 | <property file="${gsdl3srchome}/build.properties"/>
|
---|
| 26 |
|
---|
| 27 | <!-- get properties from the environment -->
|
---|
| 28 | <property environment="env"/>
|
---|
[21217] | 29 | <property name="gsdlhome" value="${env.GSDL3SRCHOME}/gs2build"/>
|
---|
[20983] | 30 | <property name="tomcat.home" value="${gsdl3srchome}/packages/tomcat"/>
|
---|
| 31 | <property name="web.home" value="${basedir}/web"/>
|
---|
[20986] | 32 | <property name="derbydb.home" value="${basedir}/web/derbyDB"/>
|
---|
[20990] | 33 | <property name="webservices.home" value="${basedir}/web/WEB-INF/services"/>
|
---|
| 34 | <property name="webclasses.home" value="${basedir}/web/WEB-INF/classes"/>
|
---|
[20983] | 35 |
|
---|
| 36 | <target name="help" description="print a help message">
|
---|
| 37 | <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
|
---|
| 38 | <echo message=" Execute 'ant -help' for Ant help."/>
|
---|
| 39 | </target>
|
---|
| 40 | <target name="configure" description="set up all the properties files etc">
|
---|
| 41 | <!-- set up the pharos tomcat context -->
|
---|
| 42 | <copy file="${basedir}/resources/tomcat/pharos.xml" tofile="${tomcat.home}/conf/Catalina/localhost/pharos.xml" overwrite="true">
|
---|
| 43 | <filterset>
|
---|
| 44 | <filter token="pharoswebhome" value="${web.home}"/>
|
---|
| 45 | </filterset>
|
---|
| 46 | </copy>
|
---|
| 47 |
|
---|
| 48 | <!-- generate VSprops.properties from .in file-->
|
---|
[21258] | 49 | <copy file="${basedir}/resources/java/VSprops.properties.in" tofile="${basedir}/classes/VSprops.properties" overwrite="true">
|
---|
[20983] | 50 | <filterset>
|
---|
[21254] | 51 | <filter token="pharosishome" value="${basedir}"/>
|
---|
[21217] | 52 | <filter token="gsdlhome" value="${gsdlhome}"/>
|
---|
[21254] | 53 | <filter token="pharosos" value="${env.GSDLOS}"/>
|
---|
[20983] | 54 | <filter token="tomcat.server" value="${tomcat.server}"/>
|
---|
| 55 | <filter token="tomcat.port" value="${tomcat.port}"/>
|
---|
| 56 | </filterset>
|
---|
| 57 | </copy>
|
---|
[20986] | 58 |
|
---|
[20990] | 59 | <!-- generate CBSE.properties from .in file-->
|
---|
| 60 | <copy file="${webservices.home}/CBSE.properties.in" tofile="${webservices.home}/CBSE.properties" overwrite="true">
|
---|
| 61 | <filterset>
|
---|
| 62 | <filter token="tomcat.server" value="${tomcat.server}"/>
|
---|
| 63 | <filter token="tomcat.port" value="${tomcat.port}"/>
|
---|
| 64 | </filterset>
|
---|
| 65 | </copy>
|
---|
| 66 |
|
---|
| 67 | <!-- generate log4j.properties from .in file-->
|
---|
| 68 | <copy file="${webclasses.home}/log4j.properties.in" tofile="${webclasses.home}/log4j.properties" overwrite="true">
|
---|
| 69 | <filterset>
|
---|
| 70 | <filter token="tomcathome" value="${tomcat.home}"/>
|
---|
| 71 | </filterset>
|
---|
| 72 | </copy>
|
---|
| 73 |
|
---|
| 74 |
|
---|
[20986] | 75 | <!-- generate empty DB if one does not already exist -->
|
---|
| 76 |
|
---|
| 77 | <copy todir="${derbydb.home}/gsImageSearchDB" overwrite="false">
|
---|
| 78 | <fileset dir="${derbydb.home}/gsImageSearchDB.empty"/>
|
---|
| 79 | </copy>
|
---|
| 80 |
|
---|
[20983] | 81 | <mkdir dir="/tmp/vstmpdir"/>
|
---|
| 82 | <mkdir dir="/tmp/vsupload"/>
|
---|
| 83 | </target>
|
---|
| 84 |
|
---|
| 85 | <target name="display">
|
---|
| 86 | <echo>gsdl3home ${gsdl3srchome}</echo>
|
---|
| 87 | <echo> tomcat port: ${tomcat.port}</echo>
|
---|
| 88 | <echo> tomcat url: ${tomcat.server}</echo>
|
---|
| 89 | </target>
|
---|
[21258] | 90 |
|
---|
| 91 | <path id="compile.classpath">
|
---|
| 92 | <pathelement location="${basedir}/pharos-imageis-lib.jar"/>
|
---|
| 93 | <!-- Include all jar files in the lib directory -->
|
---|
| 94 | <fileset dir="${basedir}/lib">
|
---|
| 95 | <include name="*.jar"/>
|
---|
| 96 | </fileset>
|
---|
| 97 | <!-- Include all jar files in gsdl3 web/lib -->
|
---|
| 98 | <!-- <pathelement location="${gsdl3srchome}/web/lib"/>-->
|
---|
| 99 | <fileset dir="${gsdl3home}/WEB-INF/lib">
|
---|
| 100 | <include name="*.jar"/>
|
---|
| 101 | </fileset>
|
---|
| 102 | <!--<pathelement location="{gsdl3srchome}/build/gsdl3.jar"/>-->
|
---|
| 103 | </path>
|
---|
| 104 |
|
---|
| 105 | <target name="compile" description="Compile up the PharosImageIS classes">
|
---|
| 106 | <javac srcdir="${basedir}/src/java"
|
---|
| 107 | destdir="${basedir}/classes"
|
---|
| 108 | debug="${compile.debug}"
|
---|
| 109 | deprecation="${compile.deprecation}"
|
---|
| 110 | optimize="${compile.optimize}">
|
---|
| 111 | <classpath>
|
---|
| 112 | <path refid="compile.classpath"/>
|
---|
| 113 | </classpath>
|
---|
| 114 | </javac>
|
---|
| 115 |
|
---|
| 116 | </target>
|
---|
| 117 |
|
---|
| 118 | <target name="install-into-greenstone" description="copy all the nexessary files into gs3 web area">
|
---|
| 119 | <copy todir="${gsdl3home}/WEB-INF/classes">
|
---|
| 120 | <fileset dir="${basedir}/classes"/>
|
---|
| 121 | </copy>
|
---|
| 122 | <copy file="${basedir}/pharos-imageis-lib.jar" todir="${gsdl3home}/WEB-INF/lib"/>
|
---|
| 123 | </target>
|
---|
[20983] | 124 | </project>
|
---|
| 125 |
|
---|
| 126 |
|
---|
| 127 |
|
---|