[9874] | 1 | <?xml version="1.0"?>
|
---|
| 2 |
|
---|
| 3 | <!-- ======================================================================
|
---|
| 4 | April 2005
|
---|
| 5 |
|
---|
| 6 | Vishnu build script
|
---|
| 7 |
|
---|
| 8 | kjdon
|
---|
| 9 | ====================================================================== -->
|
---|
| 10 | <project name="vishnu" default="all" basedir=".">
|
---|
| 11 |
|
---|
| 12 | <property environment="env"/>
|
---|
| 13 | <property name="build.dir" value="${basedir}/build"/>
|
---|
| 14 | <property name="src.dir" value="${basedir}/src"/>
|
---|
| 15 |
|
---|
| 16 | <!-- if vishnu is installed as a package inside greenstone -->
|
---|
[10075] | 17 | <property name="prefix" value="../.."/>
|
---|
[9874] | 18 | <!-- use if vishnu is standalone -->
|
---|
| 19 | <property name="prefix" value="${basedir}"/>
|
---|
[10075] | 20 | <property name="catalina.home" value="${env.CATALINA_HOME}"/>
|
---|
| 21 | <property name="web.lib" value="${prefix}/web/WEB-INF/lib"/>
|
---|
| 22 | <property name="web.classes" value="${prefix}/web/WEB-INF/classes"/>
|
---|
[9874] | 23 |
|
---|
| 24 |
|
---|
| 25 | <!-- ==================== Compilation Control Options ==================== -->
|
---|
| 26 |
|
---|
| 27 | <!--
|
---|
| 28 |
|
---|
| 29 | These properties control option settings on the Javac compiler when it
|
---|
| 30 | is invoked using the <javac> task.
|
---|
| 31 |
|
---|
| 32 | compile.debug Should compilation include the debug option?
|
---|
| 33 |
|
---|
| 34 | compile.deprecation Should compilation include the deprecation option?
|
---|
| 35 |
|
---|
| 36 | compile.optimize Should compilation include the optimize option?
|
---|
| 37 |
|
---|
| 38 | -->
|
---|
| 39 |
|
---|
| 40 | <property name="compile.debug" value="true"/>
|
---|
| 41 | <property name="compile.deprecation" value="true"/>
|
---|
| 42 | <property name="compile.optimize" value="true"/>
|
---|
| 43 |
|
---|
| 44 | <!-- classpath : this is for vishnu with Greenstone. For standalone vishnu,
|
---|
| 45 | make sure all the specified jar files are on the environment CLASSPATH -->
|
---|
| 46 | <path id="compile.classpath">
|
---|
[10075] | 47 | <pathelement location="${prefix}/lib/jni/mg.jar"/>
|
---|
| 48 | <pathelement location="${web.lib}/lucene-1.4.1.jar"/>
|
---|
| 49 | <pathelement location="${catalina.home}/common/lib/servlet-api.jar"/>
|
---|
| 50 | <pathelement location="${catalina.home}/common/endorsed/xercesImpl.jar"/>
|
---|
[9874] | 51 | <pathelement path="${env.CLASSPATH}"/>
|
---|
[10820] | 52 | <!-- if not usign this with greenstone, don't need this -->
|
---|
| 53 | <pathelement location="${web.lib}/gsdl3.jar"/>
|
---|
[9874] | 54 | </path>
|
---|
| 55 |
|
---|
| 56 | <path id="ld.library.path">
|
---|
[10075] | 57 | <pathelement location="${prefix}/lib/jni"/>
|
---|
[9874] | 58 | </path>
|
---|
| 59 | <target name="all" depends="clean,compile"/>
|
---|
| 60 |
|
---|
| 61 | <target name="clean" depends=""
|
---|
| 62 | description="Remove the compiled code">
|
---|
| 63 | <delete dir="${build.dir}"/>
|
---|
| 64 | </target>
|
---|
| 65 |
|
---|
| 66 | <target name="compile" depends=""
|
---|
| 67 | description="Compile the code">
|
---|
| 68 | <mkdir dir="${build.dir}"/>
|
---|
| 69 | <javac srcdir="${src.dir}"
|
---|
| 70 | destdir="${build.dir}"
|
---|
| 71 | debug="${compile.debug}"
|
---|
| 72 | deprecation="${compile.deprecation}"
|
---|
| 73 | optimize="${compile.optimize}">
|
---|
| 74 | <classpath>
|
---|
| 75 | <path refid="compile.classpath"/>
|
---|
| 76 | </classpath>
|
---|
[10820] | 77 | <!-- uncomment this if not in a greenstone context -->
|
---|
| 78 | <!--<exclude name="org/**"/>-->
|
---|
[9874] | 79 | </javac>
|
---|
| 80 | <jar destfile="${build.dir}/vishnu.jar">
|
---|
| 81 | <fileset dir="${build.dir}">
|
---|
| 82 | <include name="vishnu/**"/>
|
---|
[10820] | 83 | <include name="org/**"/>
|
---|
[9874] | 84 | </fileset>
|
---|
| 85 | <manifest>
|
---|
| 86 | <attribute name="Built-By" value="${user.name}" />
|
---|
| 87 | </manifest>
|
---|
| 88 | </jar>
|
---|
[10075] | 89 | <copy file="${build.dir}/vishnu.jar" todir="${web.lib}"/>
|
---|
[9874] | 90 | </target>
|
---|
| 91 | </project> |
---|