Index: anches/ant-install-branch/greenstone3-extensions/vishnu/Makefile
===================================================================
--- /branches/ant-install-branch/greenstone3-extensions/vishnu/Makefile	(revision 9706)
+++ 	(revision )
@@ -1,34 +1,0 @@
-############################################################################
-#
-# Makefile -- Makefile for vishnu package
-#
-# Copyright (C) 2004 Imperial College, London
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-###########################################################################
-
-PACKAGE = vishnu
-VERSION = 1.0
- 
-SUBDIRS =  src/vishnu 
-
-all install distclean clean:
-	for subdir in $(SUBDIRS); do \
-          echo making $@ in $$subdir; \
-          (cd $$subdir && make $@) || exit 1; \
-        done
-
-
Index: /branches/ant-install-branch/greenstone3-extensions/vishnu/build.xml
===================================================================
--- /branches/ant-install-branch/greenstone3-extensions/vishnu/build.xml	(revision 9707)
+++ /branches/ant-install-branch/greenstone3-extensions/vishnu/build.xml	(revision 9707)
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+
+<!-- ====================================================================== 
+     April 2005                                                    
+
+     Vishnu build script
+                   
+     kjdon                                                                
+     ====================================================================== -->
+<project name="vishnu" default="all" basedir=".">
+
+  <property environment="env"/>
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+
+  <!-- if vishnu is installed as a package inside greenstone -->
+  <property name="prefix" value="../../"/>
+  <!-- use if vishnu is standalone -->
+  <property name="prefix" value="${basedir}"/>
+  <property name="catalina.dir" value="${prefix}/comms/jakarta/tomcat"/>
+  <property name="web.lib.dir" value="${prefix}/web/lib"/>
+  <property name="web.classes.dir" value="${prefix}/web/WEB-INF/classes"/>
+
+
+<!--  ==================== Compilation Control Options ==================== -->
+
+<!--
+
+  These properties control option settings on the Javac compiler when it
+  is invoked using the <javac> task.
+
+  compile.debug        Should compilation include the debug option?
+
+  compile.deprecation  Should compilation include the deprecation option?
+
+  compile.optimize     Should compilation include the optimize option?
+
+-->
+
+  <property name="compile.debug"       value="true"/>
+  <property name="compile.deprecation" value="true"/>
+  <property name="compile.optimize"    value="true"/>
+
+  <!-- classpath : this is for vishnu with Greenstone. For standalone vishnu,
+  make sure all the specified jar files are on the environment CLASSPATH -->
+  <path id="compile.classpath">
+    <pathelement location="${prefix}/packages/mg/java/mg.jar"/>
+    <pathelement location="${prefix}/lib/java/lucene-1.4.1.jar"/>
+    <pathelement location="${catalina.dir}/common/lib/servlet-api.jar"/>
+    <pathelement location="${catalina.dir}/common/endorsed/xercesImpl.jar"/>
+    <pathelement path="${env.CLASSPATH}"/>
+  </path>
+
+  <path id="ld.library.path">
+    <pathelement location="${prefix}/lib"/>
+  </path>
+  <target name="all" depends="clean,compile"/>
+
+  <target name="clean" depends=""
+    description="Remove the compiled code">
+    <delete dir="${build.dir}"/>
+  </target>
+  
+  <target name="compile" depends=""
+    description="Compile the code">
+    <mkdir dir="${build.dir}"/>
+    <javac srcdir="${src.dir}"
+      destdir="${build.dir}"
+      debug="${compile.debug}"
+      deprecation="${compile.deprecation}"
+      optimize="${compile.optimize}">
+      <classpath>
+	<path refid="compile.classpath"/>
+      </classpath>
+    </javac>
+    <jar destfile="${build.dir}/vishnu.jar">
+      <fileset dir="${build.dir}">
+	<include name="vishnu/**"/>
+      </fileset>
+      <manifest>
+	<attribute name="Built-By" value="${user.name}" />
+      </manifest>
+    </jar>      
+    <copy file="${build.dir}/vishnu.jar" todir="${javalib}"/>
+    <copy file="${build.dir}/vishnu.jar" todir="${web.lib.dir}"/>
+    <mkdir dir="${web.classes}/vishnu/server"/>
+    <copy file="${build.dir}/vishnu/server/VisServlet.class"
+      todir="${web.classes}/vishnu/server"/>
+
+
+  </target>
+</project>
Index: anches/ant-install-branch/greenstone3-extensions/vishnu/make.bat
===================================================================
--- /branches/ant-install-branch/greenstone3-extensions/vishnu/make.bat	(revision 9706)
+++ 	(revision )
@@ -1,26 +1,0 @@
-@echo off
-
-:checkJAVA_HOME
-:: ---- Check JAVA_HOME environment variable is set ----
-if not "%JAVA_HOME%" == "" goto start
-   echo You need to set the JAVA_HOME environment variable before running this script.
-   goto done
-
-
-:start
-if ""%1"" == """" goto go
-if ""%1"" == ""compile"" goto go
-if ""%1"" == ""install"" goto go
-if ""%1"" == ""clean"" goto go
-if ""%1"" == ""distclean"" goto go
-
-:unknown
-	echo Error: Unrecognized argument %1.
-	goto done
-
-:go
-        cd src\vishnu
-        call winMake %1
-	cd ..\..
-	goto done
-:done
Index: anches/ant-install-branch/gsdl3/extensions/vishnu/Makefile
===================================================================
--- /branches/ant-install-branch/gsdl3/extensions/vishnu/Makefile	(revision 9706)
+++ 	(revision )
@@ -1,34 +1,0 @@
-############################################################################
-#
-# Makefile -- Makefile for vishnu package
-#
-# Copyright (C) 2004 Imperial College, London
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-###########################################################################
-
-PACKAGE = vishnu
-VERSION = 1.0
- 
-SUBDIRS =  src/vishnu 
-
-all install distclean clean:
-	for subdir in $(SUBDIRS); do \
-          echo making $@ in $$subdir; \
-          (cd $$subdir && make $@) || exit 1; \
-        done
-
-
Index: /branches/ant-install-branch/gsdl3/extensions/vishnu/build.xml
===================================================================
--- /branches/ant-install-branch/gsdl3/extensions/vishnu/build.xml	(revision 9707)
+++ /branches/ant-install-branch/gsdl3/extensions/vishnu/build.xml	(revision 9707)
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+
+<!-- ====================================================================== 
+     April 2005                                                    
+
+     Vishnu build script
+                   
+     kjdon                                                                
+     ====================================================================== -->
+<project name="vishnu" default="all" basedir=".">
+
+  <property environment="env"/>
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+
+  <!-- if vishnu is installed as a package inside greenstone -->
+  <property name="prefix" value="../../"/>
+  <!-- use if vishnu is standalone -->
+  <property name="prefix" value="${basedir}"/>
+  <property name="catalina.dir" value="${prefix}/comms/jakarta/tomcat"/>
+  <property name="web.lib.dir" value="${prefix}/web/lib"/>
+  <property name="web.classes.dir" value="${prefix}/web/WEB-INF/classes"/>
+
+
+<!--  ==================== Compilation Control Options ==================== -->
+
+<!--
+
+  These properties control option settings on the Javac compiler when it
+  is invoked using the <javac> task.
+
+  compile.debug        Should compilation include the debug option?
+
+  compile.deprecation  Should compilation include the deprecation option?
+
+  compile.optimize     Should compilation include the optimize option?
+
+-->
+
+  <property name="compile.debug"       value="true"/>
+  <property name="compile.deprecation" value="true"/>
+  <property name="compile.optimize"    value="true"/>
+
+  <!-- classpath : this is for vishnu with Greenstone. For standalone vishnu,
+  make sure all the specified jar files are on the environment CLASSPATH -->
+  <path id="compile.classpath">
+    <pathelement location="${prefix}/packages/mg/java/mg.jar"/>
+    <pathelement location="${prefix}/lib/java/lucene-1.4.1.jar"/>
+    <pathelement location="${catalina.dir}/common/lib/servlet-api.jar"/>
+    <pathelement location="${catalina.dir}/common/endorsed/xercesImpl.jar"/>
+    <pathelement path="${env.CLASSPATH}"/>
+  </path>
+
+  <path id="ld.library.path">
+    <pathelement location="${prefix}/lib"/>
+  </path>
+  <target name="all" depends="clean,compile"/>
+
+  <target name="clean" depends=""
+    description="Remove the compiled code">
+    <delete dir="${build.dir}"/>
+  </target>
+  
+  <target name="compile" depends=""
+    description="Compile the code">
+    <mkdir dir="${build.dir}"/>
+    <javac srcdir="${src.dir}"
+      destdir="${build.dir}"
+      debug="${compile.debug}"
+      deprecation="${compile.deprecation}"
+      optimize="${compile.optimize}">
+      <classpath>
+	<path refid="compile.classpath"/>
+      </classpath>
+    </javac>
+    <jar destfile="${build.dir}/vishnu.jar">
+      <fileset dir="${build.dir}">
+	<include name="vishnu/**"/>
+      </fileset>
+      <manifest>
+	<attribute name="Built-By" value="${user.name}" />
+      </manifest>
+    </jar>      
+    <copy file="${build.dir}/vishnu.jar" todir="${javalib}"/>
+    <copy file="${build.dir}/vishnu.jar" todir="${web.lib.dir}"/>
+    <mkdir dir="${web.classes}/vishnu/server"/>
+    <copy file="${build.dir}/vishnu/server/VisServlet.class"
+      todir="${web.classes}/vishnu/server"/>
+
+
+  </target>
+</project>
Index: anches/ant-install-branch/gsdl3/extensions/vishnu/make.bat
===================================================================
--- /branches/ant-install-branch/gsdl3/extensions/vishnu/make.bat	(revision 9706)
+++ 	(revision )
@@ -1,26 +1,0 @@
-@echo off
-
-:checkJAVA_HOME
-:: ---- Check JAVA_HOME environment variable is set ----
-if not "%JAVA_HOME%" == "" goto start
-   echo You need to set the JAVA_HOME environment variable before running this script.
-   goto done
-
-
-:start
-if ""%1"" == """" goto go
-if ""%1"" == ""compile"" goto go
-if ""%1"" == ""install"" goto go
-if ""%1"" == ""clean"" goto go
-if ""%1"" == ""distclean"" goto go
-
-:unknown
-	echo Error: Unrecognized argument %1.
-	goto done
-
-:go
-        cd src\vishnu
-        call winMake %1
-	cd ..\..
-	goto done
-:done
Index: anches/ant-install-branch/gsdl3/packages/vishnu/Makefile
===================================================================
--- /branches/ant-install-branch/gsdl3/packages/vishnu/Makefile	(revision 9706)
+++ 	(revision )
@@ -1,34 +1,0 @@
-############################################################################
-#
-# Makefile -- Makefile for vishnu package
-#
-# Copyright (C) 2004 Imperial College, London
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-###########################################################################
-
-PACKAGE = vishnu
-VERSION = 1.0
- 
-SUBDIRS =  src/vishnu 
-
-all install distclean clean:
-	for subdir in $(SUBDIRS); do \
-          echo making $@ in $$subdir; \
-          (cd $$subdir && make $@) || exit 1; \
-        done
-
-
Index: /branches/ant-install-branch/gsdl3/packages/vishnu/build.xml
===================================================================
--- /branches/ant-install-branch/gsdl3/packages/vishnu/build.xml	(revision 9707)
+++ /branches/ant-install-branch/gsdl3/packages/vishnu/build.xml	(revision 9707)
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+
+<!-- ====================================================================== 
+     April 2005                                                    
+
+     Vishnu build script
+                   
+     kjdon                                                                
+     ====================================================================== -->
+<project name="vishnu" default="all" basedir=".">
+
+  <property environment="env"/>
+  <property name="build.dir" value="${basedir}/build"/>
+  <property name="src.dir" value="${basedir}/src"/>
+
+  <!-- if vishnu is installed as a package inside greenstone -->
+  <property name="prefix" value="../../"/>
+  <!-- use if vishnu is standalone -->
+  <property name="prefix" value="${basedir}"/>
+  <property name="catalina.dir" value="${prefix}/comms/jakarta/tomcat"/>
+  <property name="web.lib.dir" value="${prefix}/web/lib"/>
+  <property name="web.classes.dir" value="${prefix}/web/WEB-INF/classes"/>
+
+
+<!--  ==================== Compilation Control Options ==================== -->
+
+<!--
+
+  These properties control option settings on the Javac compiler when it
+  is invoked using the <javac> task.
+
+  compile.debug        Should compilation include the debug option?
+
+  compile.deprecation  Should compilation include the deprecation option?
+
+  compile.optimize     Should compilation include the optimize option?
+
+-->
+
+  <property name="compile.debug"       value="true"/>
+  <property name="compile.deprecation" value="true"/>
+  <property name="compile.optimize"    value="true"/>
+
+  <!-- classpath : this is for vishnu with Greenstone. For standalone vishnu,
+  make sure all the specified jar files are on the environment CLASSPATH -->
+  <path id="compile.classpath">
+    <pathelement location="${prefix}/packages/mg/java/mg.jar"/>
+    <pathelement location="${prefix}/lib/java/lucene-1.4.1.jar"/>
+    <pathelement location="${catalina.dir}/common/lib/servlet-api.jar"/>
+    <pathelement location="${catalina.dir}/common/endorsed/xercesImpl.jar"/>
+    <pathelement path="${env.CLASSPATH}"/>
+  </path>
+
+  <path id="ld.library.path">
+    <pathelement location="${prefix}/lib"/>
+  </path>
+  <target name="all" depends="clean,compile"/>
+
+  <target name="clean" depends=""
+    description="Remove the compiled code">
+    <delete dir="${build.dir}"/>
+  </target>
+  
+  <target name="compile" depends=""
+    description="Compile the code">
+    <mkdir dir="${build.dir}"/>
+    <javac srcdir="${src.dir}"
+      destdir="${build.dir}"
+      debug="${compile.debug}"
+      deprecation="${compile.deprecation}"
+      optimize="${compile.optimize}">
+      <classpath>
+	<path refid="compile.classpath"/>
+      </classpath>
+    </javac>
+    <jar destfile="${build.dir}/vishnu.jar">
+      <fileset dir="${build.dir}">
+	<include name="vishnu/**"/>
+      </fileset>
+      <manifest>
+	<attribute name="Built-By" value="${user.name}" />
+      </manifest>
+    </jar>      
+    <copy file="${build.dir}/vishnu.jar" todir="${javalib}"/>
+    <copy file="${build.dir}/vishnu.jar" todir="${web.lib.dir}"/>
+    <mkdir dir="${web.classes}/vishnu/server"/>
+    <copy file="${build.dir}/vishnu/server/VisServlet.class"
+      todir="${web.classes}/vishnu/server"/>
+
+
+  </target>
+</project>
Index: anches/ant-install-branch/gsdl3/packages/vishnu/make.bat
===================================================================
--- /branches/ant-install-branch/gsdl3/packages/vishnu/make.bat	(revision 9706)
+++ 	(revision )
@@ -1,26 +1,0 @@
-@echo off
-
-:checkJAVA_HOME
-:: ---- Check JAVA_HOME environment variable is set ----
-if not "%JAVA_HOME%" == "" goto start
-   echo You need to set the JAVA_HOME environment variable before running this script.
-   goto done
-
-
-:start
-if ""%1"" == """" goto go
-if ""%1"" == ""compile"" goto go
-if ""%1"" == ""install"" goto go
-if ""%1"" == ""clean"" goto go
-if ""%1"" == ""distclean"" goto go
-
-:unknown
-	echo Error: Unrecognized argument %1.
-	goto done
-
-:go
-        cd src\vishnu
-        call winMake %1
-	cd ..\..
-	goto done
-:done
