Index: build.xml
===================================================================
--- build.xml	(revision 4968)
+++ build.xml	(revision 4969)
@@ -1,1463 +1,1526 @@
 <?xml version="1.0"?>
 <!--
-  *   '$RCSfile$'
-  *     Authors: Matt Jones, Chad Berkley, Jivka Bojilova
-  *   Copyright: 2000 Regents of the University of California and the
-  *              National Center for Ecological Analysis and Synthesis
-  * For Details: http://www.nceas.ucsb.edu/
-  *
-  *    '$Author$'
-  *    '$Date$'
-  *    '$Revision$'
-  *
-  * Build file for the Ant cross-platform build system for metacat
-  * See http://jakarta.apache.org for details on Ant
-  *
-  * usage: ant [compile|jar|install|jdoc]
-  *
-  * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+	*   '$RCSfile$'
+	*     Authors: Matt Jones, Chad Berkley, Jivka Bojilova
+	*   Copyright: 2000 Regents of the University of California and the
+	*              National Center for Ecological Analysis and Synthesis
+	* For Details: http://www.nceas.ucsb.edu/
+	*
+	*    '$Author$'
+	*    '$Date$'
+	*    '$Revision$'
+	*
+	* Build file for the Ant cross-platform build system for metacat
+	* See http://jakarta.apache.org for details on Ant
+	*
+	* usage: ant [compile|jar|install|jdoc]
+	*
+	* 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -->
 <project name="metacat" default="jar" basedir=".">
-  <property environment="env"/>
-  <property file="build.properties"/>  <!-- USER SPECIFIC PROPS -->
-	
-	
-  
-	
-  <!-- Determine if ecogrid should be installed-->
-  <condition property="enable.ecogrid">
-    <equals arg1="${install.ecogrid}" arg2="true" />
-  </condition>
-  
-  <!-- Determine if perl should be built-->
-  <condition property="build.perl">
-    <equals arg1="${make.perl.code}" arg2="true" />
-  </condition>
+	<property environment="env" />
+	<property file="build.properties" /><!-- USER SPECIFIC PROPS -->
 
-   <target name="config">
-   	  <property name="jsdk" value="${build.tomcat.dir}/common/lib/servlet-api.jar"/>
-      <!-- usr for client testing, generally you don't need change-->
-      <property name="mcuser"              value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"/>
-      <property name="mcpassword"          value="kepler"/>
-      <property name="mcanotheruser"       value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"/>
-      <property name="mcanotherpassword"   value="yourpass"/>
-   	  <property name="piscouser"           value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
-   	  <property name="piscopassword"       value="yourpass"/>
-   	  <property name="lteruser"            value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
-   	  <property name="lterpassword"        value="yourpass"/>
 
-      <property name="debug"               value="on" />
-      <property name="morphosourcedir"     value="../morpho" />
-      <property name="utilitiesdir"        value="../utilities" />
-      <property name="installdir"        value="${app.deploy.dir}/${metacat.context}" />
 
-      <echo>*********** set jsdk to ${jsdk}</echo>
-  </target>
 
-   <target name="init" depends="config">
-      <path id="compile.classpath">
-        <pathelement location="${jsdk}"/>
-        <pathelement location="lib"/>
-        <fileset dir="lib">
-          <include name="*.jar"/>
-        </fileset>
-	    <fileset dir="lib">
-           <include name="xalan.jar"/>
-         </fileset>
-       <fileset dir="lib/lsid_lib">
-         <include name="*.jar"/>
-       </fileset>     	
+	<!-- Determine if ecogrid should be installed-->
+	<condition property="enable.ecogrid">
+		<equals arg1="${install.ecogrid}" arg2="true" />
+	</condition>
 
-        <!-- Include geoserver, geotools, et. al. -->
-        <fileset dir="lib/spatial/geoserver/WEB-INF/lib">
-          <include name="*.jar"/>
-        </fileset>
-        <pathelement location="lib/spatial/geoserver/WEB-INF/classes"/>
+	<!-- Determine if perl should be built-->
+	<condition property="build.perl">
+		<equals arg1="${make.perl.code}" arg2="true" />
+	</condition>
 
-        <!-- Include OAI-PMH -->
-        <fileset dir="lib/oaipmh">
-          <include name="*.jar"/>
-        </fileset>
+	<target name="config">
+		<property name="jsdk"
+			value="${build.tomcat.dir}/common/lib/servlet-api.jar" />
+		<!-- usr for client testing, generally you don't need change-->
+		<property name="mcuser"
+			value="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org" />
+		<property name="mcpassword" value="kepler" />
+		<property name="mcanotheruser"
+			value="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org" />
+		<property name="mcanotherpassword" value="yourpass" />
+		<property name="piscouser"
+			value="uid=tao,o=PISCO,dc=ecoinformatics,dc=org" />
+		<property name="piscopassword" value="yourpass" />
+		<property name="lteruser"
+			value="uid=jtao,o=LTER,dc=ecoinformatics,dc=org" />
+		<property name="lterpassword" value="yourpass" />
 
-      </path>
-      
-      <!-- It is less likely you'll need to make any changes from here down,
-           but customization is possible -->
-      <property name="name"                value="metacat"/>
-      <property name="Name"                value="MetaCat"/>
-      <property name="debugprefix"         value="${Name}:"/>
-      <property name="release"             value="${metacat.version}"/>
-      <property name="style-common-relpath" value="/style/common"/>
-      <property name="style-shared-relpath" value="/style/shared"/>
-      <property name="schema-relpath"      value="/schema"/>
-      <property name="style-common-cvsrelpath" value="lib${style-common-relpath}"/>
-   	  <property name="schema-cvsrelpath"   value="lib${schema-relpath}"/>
-      <property name="style-skins-relpath" value="/style/skins"/>
-      <property name="util-module"         value="utilities" />
-   	  <property name="utilities-tag"       value="UTILITIES_1_0_1" />
-      <property name="eml-module"          value="eml" />
-      <property name="eml-version"         value="2.0.0beta6" />
-      <property name="eml-beta-tag"        value="BRANCH_EML_2_0_0_BETA_6_FOR_METACAT" />
-      <property name="eml2_0_0-schema-tag" value="RELEASE_EML_2_0_0_UPDATE_1" />
-      <property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
-   	  <property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0" />
-      <property name="eml2-style-tag"      value="RELEASE_EML_UTILS_0_9_0" />  
-      <property name="eml2_0_0namespace"   value="eml://ecoinformatics.org/eml-2.0.0" />
-      <property name="eml2_0_1namespace"   value="eml://ecoinformatics.org/eml-2.0.1" />
-      <property name="eml2_1_0namespace"   value="eml://ecoinformatics.org/eml-2.1.0" />
-      <property name="stmmlnamespace"      value="http://www.xml-cml.org/schema/stmml" />
-      <property name="eml-css"             value="eml_xsl.css"/>
-      <property name="eml-module.default.css"
-                                           value="default.css"/>
-   	<property name="systemidserver"             value=""/>
-   	<property name="html-path"             value=""/>
-   	
-   	  
-      <!-- Config for registry variables -->
-      <!-- TODO: SCW remove these, covered in metacat.properties or in skin.properties --> 
-      <property name="scope"               value="obfs"/>
-      <property name="responseForm"        value="genericResponse.tmpl"/>
-      <property name="entryForm"           value="entryForm.tmpl"/>
-      <property name="guide"               value="genericGuide.tmpl"/>
-      <property name="loginForm"           value="loginForm.tmpl"/>
-      <property name="confirmData"         value="confirmData.tmpl"/>
-      <property name="deleteData"          value="deleteData.tmpl"/>
-      <property name="genericHeader"       value="genericHeader.tmpl"/>
-      <property name="genericFooter"       value="genericFooter.tmpl"/>
+		<property name="debug" value="on" />
+		<property name="morphosourcedir" value="../morpho" />
+		<property name="utilitiesdir" value="../utilities" />
+		<property name="installdir"
+			value="${app.deploy.dir}/${metacat.context}" />
 
-      <filter token="scope"                value="${scope}"/>
-      <filter token="responseForm"         value="${responseForm}"/>
-      <filter token="entryForm"            value="${entryForm}"/>
-      <filter token="guide"                value="${guide}"/>
-      <filter token="loginForm"            value="${loginForm}"/>
-      <filter token="confirmData"          value="${confirmData}"/>
-      <filter token="deleteData"           value="${deleteData}"/>
-      <filter token="genericHeader"        value="${genericHeader}"/>
-      <filter token="genericFooter"        value="${genericFooter}"/>
-      <filter token="adminname"            value="${adminname}"/>
-      <filter token="recipient"            value="${recipient}"/>
-   	  <filter token="metacatVersion"       value="${metacat.version}"/>
- 	  <filter token="metacatRC"            value="${metacat.releaseCandidate}"/>
- 	  <filter token="build.context"        value="${metacat.context}"/>
+		<echo>*********** set jsdk to ${jsdk}</echo>
+	</target>
 
-      <filter token="docrooturl"           value="./" />
-      <filter token="mcuser"               value="${mcuser}"/>
-      <filter token="mcpassword"           value="${mcpassword}"/>
-      <filter token="mcanotheruser"        value="${mcanotheruser}"/>
-      <filter token="mcanotherpassword"    value="${mcanotherpassword}"/>
-      <filter token="eml-css"              value="${eml-css}"/>
-      <filter token="style-skins-relpath"  value="${style-skins-relpath}"/>
-      <filter token="style-common-relpath" value="${style-common-relpath}"/>
+	<target name="init" depends="config">
+		<path id="compile.classpath">
+			<pathelement location="${jsdk}" />
+			<pathelement location="lib" />
+			<fileset dir="lib">
+				<include name="*.jar" />
+			</fileset>
+			<fileset dir="lib">
+				<include name="xalan.jar" />
+			</fileset>
+			<fileset dir="lib/lsid_lib">
+				<include name="*.jar" />
+			</fileset>
 
-      <filter token="eml-version"          value="${eml-version}"/>
-      <filter token="eml2_0_0namespace"    value="${eml2_0_0namespace}"/>
-      <filter token="eml2_0_1namespace"    value="${eml2_0_1namespace}"/>
-      <filter token="eml2_1_0namespace"    value="${eml2_1_0namespace}"/>
-      <filter token="stmmlnamespace"       value="${stmmlnamespace}"/>
-      <filter token="debugprefix"          value="${debugprefix}"/>
+			<!-- Include geoserver, geotools, et. al. -->
+			<fileset dir="lib/spatial/geoserver/WEB-INF/lib">
+				<include name="*.jar" />
+			</fileset>
+			<pathelement
+				location="lib/spatial/geoserver/WEB-INF/classes" />
 
-      <filter token="defaultStage"         value="${defaultStage}"/>
-      <filter token="defaultHeader"        value="${defaultHeader}"/>
-      <filter token="defaultFooter"        value="${defaultFooter}"/>
-      <filter token="defaultChangePass"    value="${defaultChangePass}"/>
-      <filter token="defaultResetPass"     value="${defaultResetPass}"/>
-      <filter token="changePassSuccess"    value="${changePassSuccess}"/>
-      <filter token="resetPassSuccess"     value="${resetPassSuccess}"/>
-      <filter token="registerFailed"       value="${registerFailed}"/>
-      <filter token="registerLter"         value="${registerLter}"/>
-      <filter token="registerMatch"        value="${registerMatch}"/>
-      <filter token="registerSuccess"      value="${registerSuccess}"/>
-      <filter token="register"             value="${register}"/>
-      <filter token="searchResults"        value="${searchResults}"/>
-   	  <filter token="ldapMainServerFailure" value="${ldapMainServerFailure}"/>
-   	  <filter token="lter-user"            value="${lteruser}"/>
-   	  <filter token="lter-pass"            value="${lterpassword}"/>
-      <filter token="pisco-user"           value="${piscouser}"/>
-      <filter token="pisco-pass"           value="${piscopassword}"/>
-   	   
-       
-   	  <!-- MCD BYE filter token="timedreplication"     value="${timedreplication}" / -->
-   	  <!-- MCD BYE filter token="firsttimedreplication" value="${firsttimedreplication}" / -->
-   	  <!-- MCD BYE filter token="timedreplicationinterval" value="${timedreplicationinterval}" / -->
-      
-   	  <property name="srcdir"              value="./src" />
-   	  <property name="lib.dir"             value="./lib" />
-   	  <property name="docdir"              value="./docs" />
- 	  <property name="cgidir"              value="./cgi-bin" />
-      <property name="testdir"             value="./test" />
-      <property name="testtorun"           value="BuildIndexTest" />
-      <property name="junittestsdir"       value="./test/edu/ucsb/nceas/metacattest" />
-      <property name="junitnettestsdir"    value="./test/edu/ucsb/nceas/metacatnettest" />
-      <property name="build.dir"           value="./build"/>
-      <property name="build.src"           value="${build.dir}/src"/>
-      <property name="build.dest"          value="${build.dir}/classes"/>
-      <property name="build.samples"       value="${build.dir}/samples"/>
-      <property name="build.tests"         value="${build.dir}/tests"/>
-      <property name="build.tmp"           value="${build.dir}/tmp"/>
-      <property name="build.metacattest"   value="${build.tests}/metacattest"/>
-      <property name="build.metacatnettest" value="${build.tests}/metacatnettest"/>
-      <property name="build.data"          value="${build.dir}/data"/>
-      <property name="build.javadocs"      value="${build.dir}/docs/api"/>
-      <property name="build.war"           value="${build.dir}/war"/>
-      <property name="dist.dir"            value="dist"/>
-      <property name="ver.dir"             value="${dist.dir}/${name}-${release}"/>
-      <property name="ver.src"             value="${ver.dir}/src"/>
-      <property name="util.dir"            value="${dist.dir}/${util-module}"/>
-      <property name="test.dir"            value="${dist.dir}/test"/>
-	  <!-- directories for creating a Harvest List Editor distribution -->
-      <property name="dist.dir.hle"        value="disthle"/>
-      <property name="ver.dir.hle"         value="${dist.dir.hle}/harvest-list-editor-${release}"/>
-   	  <property name="pkg.dir"             value="./package" />
-   	  <property name="deb.pkg.dir"         value="${pkg.dir}/debian" />
-	  
-   	  <property name="ecogrid-target-name" value="metacatImpl"/>
-   	  <property name="ecogrid-module-dest-dir" value =".."/>
-   	  <property name="ecogrid-module"      value="seek/projects/ecogrid"/>
-   	  <property name="ecogrid-dist-dir"    value="${dist.dir}/${ecogrid-module}"/>
-   	  <property name="ecogrid-dir"         value="${ecogrid-module-dest-dir}/${ecogrid-module}"/>
+			<!-- Include OAI-PMH -->
+			<fileset dir="lib/oaipmh">
+				<include name="*.jar" />
+			</fileset>
 
-      <property name="package.home"        value="edu/ucsb/nceas/metacat" />
-      
-      <!-- set up svn -->
-   	  <property name="svnant.lib" value="lib" />
-      <property name="svnant.jar" value="${svnant.lib}/svnant.jar" />
-      <property name="svnClientAdapter.jar" value="${svnant.lib}/svnClientAdapter.jar" />
-      <property name="svnjavahl.jar" value="${svnant.lib}/svnjavahl.jar" />
-   	  <property name="svn.utilitiesUrl" value="https://code.ecoinformatics.org/code/utilities/tags/${utilities-tag}" />
-      <property name="svn.ecogridUrl" value="https://code.ecoinformatics.org/code/seek/trunk/projects/ecogrid/" />
-      <!--  property name="svn.utilitiesExportPath" value="${knbdir}" / -->  
-      
-      <!-- load the svn task -->
-      <path id="svn.classpath">
-        <pathelement location="${svnjavahl.jar}" />
-        <pathelement location="${svnant.jar}" />
-        <pathelement location="${svnClientAdapter.jar}" />
-      </path>
-      <taskdef resource="svntask.properties" classpathref="svn.classpath"/>  
-      
-      <condition property="utilities.required">
-        <or>
-          <not><available file="lib/httpclient.jar"/></not>
-          <not><available file="lib/utilities.jar"/></not>
-          <not><available file="${utilitiesdir}" type="dir"/></not>
-        </or>
-      </condition>
-   	  <!-- peer.utilities.required is used when there is no utilities 
-   	       directory at ${utilitiesdir} -->
-      <condition property="peer.utilities.required">
-        <or>
-          <not><available file="${utilitiesdir}" type="dir"/></not>
-        </or>
-      </condition>
-      <condition property="eml.required">
-        <or>
-          <not><available file="lib/schema/eml-2.0.1/eml.xsd"/></not>
-          <not><available file="lib/schema/eml-2.0.0/eml.xsd"/></not>
-          <not><available file="lib/schema/eml-2.1.0/eml.xsd"/></not>
-          <not><available file="lib/dtd/eml-dataset-2.0.0beta6.dtd"/></not>
-        </or>
-      </condition>
-   	  
-      <condition property="ecogrid.required">
-      	   <or>
-             <not><available file="${ecogrid-dir}/build.properties"/></not>
-             <not><available file="${ecogrid-dir}/buildfiles/metacatImpl.xml"/></not>
-           </or>
-      </condition>
+		</path>
 
-   </target>
+		<!-- It is less likely you'll need to make any changes from here down,
+			but customization is possible -->
+		<property name="name" value="metacat" />
+		<property name="Name" value="MetaCat" />
+		<property name="debugprefix" value="${Name}:" />
+		<property name="release" value="${metacat.version}" />
+		<property name="style-common-relpath" value="/style/common" />
+		<property name="style-shared-relpath" value="/style/shared" />
+		<property name="schema-relpath" value="/schema" />
+		<property name="style-common-cvsrelpath"
+			value="lib${style-common-relpath}" />
+		<property name="schema-cvsrelpath" value="lib${schema-relpath}" />
+		<property name="style-skins-relpath" value="/style/skins" />
+		<property name="util-module" value="utilities" />
+		<property name="utilities-tag" value="UTILITIES_1_0_1" />
+		<property name="eml-module" value="eml" />
+		<property name="eml-version" value="2.0.0beta6" />
+		<property name="eml-beta-tag"
+			value="BRANCH_EML_2_0_0_BETA_6_FOR_METACAT" />
+		<property name="eml2_0_0-schema-tag"
+			value="RELEASE_EML_2_0_0_UPDATE_1" />
+		<property name="eml2_0_1-schema-tag" value="RELEASE_EML_2_0_1" />
+		<property name="eml2_1_0-schema-tag" value="RELEASE_EML_2_1_0" />
+		<property name="eml2-style-tag" value="RELEASE_EML_UTILS_0_9_0" />
+		<property name="eml2_0_0namespace"
+			value="eml://ecoinformatics.org/eml-2.0.0" />
+		<property name="eml2_0_1namespace"
+			value="eml://ecoinformatics.org/eml-2.0.1" />
+		<property name="eml2_1_0namespace"
+			value="eml://ecoinformatics.org/eml-2.1.0" />
+		<property name="stmmlnamespace"
+			value="http://www.xml-cml.org/schema/stmml" />
+		<property name="eml-css" value="eml_xsl.css" />
+		<property name="eml-module.default.css" value="default.css" />
+		<property name="systemidserver" value="" />
+		<property name="html-path" value="" />
 
-   <target name="prepare" depends="init">
-      <mkdir dir="${build.dir}"/>
-      <mkdir dir="${build.src}"/>
-      <mkdir dir="${build.dest}"/>
-      <mkdir dir="${build.javadocs}"/>
-      <mkdir dir="${build.tmp}"/>
 
-      <copy todir="${build.src}" filtering="yes">
-        <fileset dir="${srcdir}">
-          <include name="edu/**"/>
-          <include name="com/**"/>
-          <include name="org/**"/>
-          <include name="**/*.sql"/>
-          <exclude name="**/CVS*"/>
-          <exclude name="**/.#*"/>
-        </fileset>
-      </copy>
-      <available file="lib/style/common/emlb6toeml2" type="dir"
-                 property="styles.not.needed"/>
-   </target>
+		<!-- Config for registry variables -->
+		<!-- TODO: SCW remove these, covered in metacat.properties or in skin.properties -->
+		<property name="scope" value="obfs" />
+		<property name="responseForm" value="genericResponse.tmpl" />
+		<property name="entryForm" value="entryForm.tmpl" />
+		<property name="guide" value="genericGuide.tmpl" />
+		<property name="loginForm" value="loginForm.tmpl" />
+		<property name="confirmData" value="confirmData.tmpl" />
+		<property name="deleteData" value="deleteData.tmpl" />
+		<property name="genericHeader" value="genericHeader.tmpl" />
+		<property name="genericFooter" value="genericFooter.tmpl" />
 
-	<taskdef resource="axis-tasks.properties" classpathref="compile.classpath"/>
-	
+		<filter token="scope" value="${scope}" />
+		<filter token="responseForm" value="${responseForm}" />
+		<filter token="entryForm" value="${entryForm}" />
+		<filter token="guide" value="${guide}" />
+		<filter token="loginForm" value="${loginForm}" />
+		<filter token="confirmData" value="${confirmData}" />
+		<filter token="deleteData" value="${deleteData}" />
+		<filter token="genericHeader" value="${genericHeader}" />
+		<filter token="genericFooter" value="${genericFooter}" />
+		<filter token="adminname" value="${adminname}" />
+		<filter token="recipient" value="${recipient}" />
+		<filter token="metacatVersion" value="${metacat.version}" />
+		<filter token="metacatRC" value="${metacat.releaseCandidate}" />
+		<filter token="build.context" value="${metacat.context}" />
+
+		<filter token="docrooturl" value="./" />
+		<filter token="mcuser" value="${mcuser}" />
+		<filter token="mcpassword" value="${mcpassword}" />
+		<filter token="mcanotheruser" value="${mcanotheruser}" />
+		<filter token="mcanotherpassword" value="${mcanotherpassword}" />
+		<filter token="eml-css" value="${eml-css}" />
+		<filter token="style-skins-relpath"
+			value="${style-skins-relpath}" />
+		<filter token="style-common-relpath"
+			value="${style-common-relpath}" />
+
+		<filter token="eml-version" value="${eml-version}" />
+		<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}" />
+		<filter token="eml2_0_1namespace" value="${eml2_0_1namespace}" />
+		<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}" />
+		<filter token="stmmlnamespace" value="${stmmlnamespace}" />
+		<filter token="debugprefix" value="${debugprefix}" />
+
+		<filter token="defaultStage" value="${defaultStage}" />
+		<filter token="defaultHeader" value="${defaultHeader}" />
+		<filter token="defaultFooter" value="${defaultFooter}" />
+		<filter token="defaultChangePass" value="${defaultChangePass}" />
+		<filter token="defaultResetPass" value="${defaultResetPass}" />
+		<filter token="changePassSuccess" value="${changePassSuccess}" />
+		<filter token="resetPassSuccess" value="${resetPassSuccess}" />
+		<filter token="registerFailed" value="${registerFailed}" />
+		<filter token="registerLter" value="${registerLter}" />
+		<filter token="registerMatch" value="${registerMatch}" />
+		<filter token="registerSuccess" value="${registerSuccess}" />
+		<filter token="register" value="${register}" />
+		<filter token="searchResults" value="${searchResults}" />
+		<filter token="ldapMainServerFailure"
+			value="${ldapMainServerFailure}" />
+		<filter token="lter-user" value="${lteruser}" />
+		<filter token="lter-pass" value="${lterpassword}" />
+		<filter token="pisco-user" value="${piscouser}" />
+		<filter token="pisco-pass" value="${piscopassword}" />
+
+
+		<!-- MCD BYE filter token="timedreplication"     value="${timedreplication}" / -->
+		<!-- MCD BYE filter token="firsttimedreplication" value="${firsttimedreplication}" / -->
+		<!-- MCD BYE filter token="timedreplicationinterval" value="${timedreplicationinterval}" / -->
+
+		<property name="srcdir" value="./src" />
+		<property name="lib.dir" value="./lib" />
+		<property name="docdir" value="./docs" />
+		<property name="cgidir" value="./cgi-bin" />
+		<property name="testdir" value="./test" />
+		<property name="testtorun" value="BuildIndexTest" />
+		<property name="junittestsdir"
+			value="./test/edu/ucsb/nceas/metacattest" />
+		<property name="junitnettestsdir"
+			value="./test/edu/ucsb/nceas/metacatnettest" />
+		<property name="build.dir" value="./build" />
+		<property name="build.src" value="${build.dir}/src" />
+		<property name="build.dest" value="${build.dir}/classes" />
+		<property name="build.samples" value="${build.dir}/samples" />
+		<property name="build.tests" value="${build.dir}/tests" />
+		<property name="build.tmp" value="${build.dir}/tmp" />
+		<property name="build.metacattest"
+			value="${build.tests}/metacattest" />
+		<property name="build.metacatnettest"
+			value="${build.tests}/metacatnettest" />
+		<property name="build.data" value="${build.dir}/data" />
+		<property name="build.javadocs" value="${build.dir}/docs/api" />
+		<property name="build.war" value="${build.dir}/war" />
+		<property name="dist.dir" value="dist" />
+		<property name="ver.dir" value="${dist.dir}/${name}-${release}" />
+		<property name="ver.src" value="${ver.dir}/src" />
+		<property name="util.dir" value="${dist.dir}/${util-module}" />
+		<property name="test.dir" value="${dist.dir}/test" />
+		<!-- directories for creating a Harvest List Editor distribution -->
+		<property name="dist.dir.hle" value="disthle" />
+		<property name="ver.dir.hle"
+			value="${dist.dir.hle}/harvest-list-editor-${release}" />
+		<property name="pkg.dir" value="./package" />
+		<property name="deb.pkg.dir" value="${pkg.dir}/debian" />
+
+		<property name="ecogrid-target-name" value="metacatImpl" />
+		<property name="ecogrid-module-dest-dir" value=".." />
+		<property name="ecogrid-module" value="seek/projects/ecogrid" />
+		<property name="ecogrid-dist-dir"
+			value="${dist.dir}/${ecogrid-module}" />
+		<property name="ecogrid-dir"
+			value="${ecogrid-module-dest-dir}/${ecogrid-module}" />
+
+		<property name="package.home" value="edu/ucsb/nceas/metacat" />
+
+		<!-- set up svn -->
+		<property name="svnant.lib" value="lib" />
+		<property name="svnant.jar" value="${svnant.lib}/svnant.jar" />
+		<property name="svnClientAdapter.jar"
+			value="${svnant.lib}/svnClientAdapter.jar" />
+		<property name="svnjavahl.jar"
+			value="${svnant.lib}/svnjavahl.jar" />
+		<property name="svn.utilitiesUrl"
+			value="https://code.ecoinformatics.org/code/utilities/tags/${utilities-tag}" />
+		<property name="svn.ecogridUrl"
+			value="https://code.ecoinformatics.org/code/seek/trunk/projects/ecogrid/" />
+		<!--  property name="svn.utilitiesExportPath" value="${knbdir}" / -->
+
+		<!-- load the svn task -->
+		<path id="svn.classpath">
+			<pathelement location="${svnjavahl.jar}" />
+			<pathelement location="${svnant.jar}" />
+			<pathelement location="${svnClientAdapter.jar}" />
+		</path>
+		<taskdef resource="svntask.properties"
+			classpathref="svn.classpath" />
+
+		<condition property="utilities.required">
+			<or>
+				<not>
+					<available file="lib/httpclient.jar" />
+				</not>
+				<not>
+					<available file="lib/utilities.jar" />
+				</not>
+				<not>
+					<available file="${utilitiesdir}" type="dir" />
+				</not>
+			</or>
+		</condition>
+		<!-- peer.utilities.required is used when there is no utilities 
+			directory at ${utilitiesdir} -->
+		<condition property="peer.utilities.required">
+			<or>
+				<not>
+					<available file="${utilitiesdir}" type="dir" />
+				</not>
+			</or>
+		</condition>
+		<condition property="eml.required">
+			<or>
+				<not>
+					<available file="lib/schema/eml-2.0.1/eml.xsd" />
+				</not>
+				<not>
+					<available file="lib/schema/eml-2.0.0/eml.xsd" />
+				</not>
+				<not>
+					<available file="lib/schema/eml-2.1.0/eml.xsd" />
+				</not>
+				<not>
+					<available
+						file="lib/dtd/eml-dataset-2.0.0beta6.dtd" />
+				</not>
+			</or>
+		</condition>
+
+		<condition property="ecogrid.required">
+			<or>
+				<not>
+					<available file="${ecogrid-dir}/build.properties" />
+				</not>
+				<not>
+					<available
+						file="${ecogrid-dir}/buildfiles/metacatImpl.xml" />
+				</not>
+			</or>
+		</condition>
+
+	</target>
+
+	<target name="prepare" depends="init">
+		<mkdir dir="${build.dir}" />
+		<mkdir dir="${build.src}" />
+		<mkdir dir="${build.dest}" />
+		<mkdir dir="${build.javadocs}" />
+		<mkdir dir="${build.tmp}" />
+
+		<copy todir="${build.src}" filtering="yes">
+			<fileset dir="${srcdir}">
+				<include name="edu/**" />
+				<include name="com/**" />
+				<include name="org/**" />
+				<!-- include name="java/**" / -->
+				<include name="**/*.sql" />
+				<exclude name="**/CVS*" />
+				<exclude name="**/.#*" />
+			</fileset>
+		</copy>
+		<available file="lib/style/common/emlb6toeml2" type="dir"
+			property="styles.not.needed" />
+	</target>
+
+	<taskdef resource="axis-tasks.properties"
+		classpathref="compile.classpath" />
+
 	<target name="generateStubs" depends="prepare">
-		<echo message=" Generating stubs for execution service from ${wsdl.url.kepler}" />
-		<axis-wsdl2java verbose="true" output="${srcdir}" 
-			url="${wsdl.url.kepler}"  />
+		<echo
+			message=" Generating stubs for execution service from ${/tmp/KeplerWebService.wsdl}" />
+		<axis-wsdl2java verbose="true" output="${srcdir}"
+			url="/tmp/KeplerWebService.wsdl" />
 	</target>
-	
-   <target name="compile" depends="prepare,utilities"
-    description="Compiles java code to build dir, and copies metacat props files there">
 
-       <javac srcdir="${build.src}"
-              destdir="${build.dest}"
-              debug="${debug}"
-              excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
-        <classpath>
-          <path refid="compile.classpath"/>
-        </classpath>
-      </javac>
-   </target>
+	<target name="compile" depends="prepare,utilities"
+		description="Compiles java code to build dir, and copies metacat props files there">
 
-   <target name="jar" depends="compile,geteml"
-    description="Compiles and jars metacat java code to metacat.jar in build dir ">
+		<javac srcdir="${build.src}" destdir="${build.dest}"
+			debug="${debug}"
+			excludes="**/*.sql **/stringclient/** **/client/*.java **/harvesterClient/*.java">
+			<classpath>
+				<path refid="compile.classpath" />
+			</classpath>
+		</javac>
+	</target>
 
-       <delete file="${build.dir}/${name}.jar" />
-       <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
-            excludes="**/protocols/ **/harvesterClient/" />
-   </target>
+	<target name="jar" depends="compile,geteml"
+		description="Compiles and jars metacat java code to metacat.jar in build dir ">
 
-   <target name="protocol" depends="compile"
-    description="Compiles and jars protocol java code to protocol.jar in build dir">
-       <delete file="${build.dir}/protocol.jar" />
-       <jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
-            includes="**/protocols/" />
-   </target>
+		<delete file="${build.dir}/${name}.jar" />
+		<jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"
+			excludes="**/protocols/ **/harvesterClient/" />
+	</target>
 
-   <target name="utilities" depends="config,getpeerutilities" if="utilities.required">
-     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
-     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
-     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
-     <copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
-   </target>
-	
-   <target name="getpeerutilities" depends="prepare" if="peer.utilities.required"
-	description="Checks utilities out of svn and copies it to your utilitiesdir if it does not already exist">
-   	 <echo message="Exporting utiities files from svn repository:" />
-   	 <!-- input message="Please enter svn repo username:" addproperty="svn.username" / -->
-   	 <!-- input message="Please enter svn repo password:" addproperty="svn.password" / -->
-   	 <!--  svn username="${svn.username}" password="${svn.password}" -->
-   	 <svn>
-   	   <export srcUrl="${svn.utilitiesUrl}" destPath="${utilitiesdir}" />
-   	 </svn>
+	<target name="protocol" depends="compile"
+		description="Compiles and jars protocol java code to protocol.jar in build dir">
+		<delete file="${build.dir}/protocol.jar" />
+		<jar jarfile="${build.dir}/protocol.jar" basedir="${build.dest}"
+			includes="**/protocols/" />
+	</target>
 
-     <!--  ant dir="${utilitiesdir}" inheritAll="false"  target="dist" / -->
-   </target>
+	<target name="utilities" depends="config,getpeerutilities"
+		if="utilities.required">
+		<ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
+		<ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
+		<copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
+		<copy file="${utilitiesdir}/build/utilities.jar" todir="lib" />
+	</target>
 
-   <target name="getutilities" depends="prepare"
-   description="Checks utility out of svn and copies it to your metacat cvs sandbox">
-     <echo>Enter CVS password: </echo>
-     <cvs cvsRoot="${cvsroot}"
-          package="${util-module}"
-     	  tag="${utilities-tag}"
-          dest="${build.tmp}" />
-   </target>
+	<target name="getpeerutilities" depends="prepare"
+		if="peer.utilities.required"
+		description="Checks utilities out of svn and copies it to your utilitiesdir if it does not already exist">
+		<echo message="Exporting utiities files from svn repository:" />
+		<!-- input message="Please enter svn repo username:" addproperty="svn.username" / -->
+		<!-- input message="Please enter svn repo password:" addproperty="svn.password" / -->
+		<!--  svn username="${svn.username}" password="${svn.password}" -->
+		<svn>
+			<export srcUrl="${svn.utilitiesUrl}"
+				destPath="${utilitiesdir}" />
+		</svn>
 
-   <target name="client" depends="utilities, prepare"
-    description="Compiles metacat-client java code to build dir">
-       <javac srcdir="${build.src}"
-              destdir="${build.dest}"
-              includes="edu/ucsb/nceas/metacat/client/*">
-          <classpath>
-            <path refid="compile.classpath"/>
-          </classpath>
-        </javac>
-   </target>
+		<!--  ant dir="${utilitiesdir}" inheritAll="false"  target="dist" / -->
+	</target>
 
-   <target name="clientjar" depends="client"
-    description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
-       <delete file="${build.dir}/${name}-client.jar" />
-       <jar jarfile="${build.dir}/${name}-client.jar" basedir="${build.dest}"
-            includes="**/metacat/client/" />
-   </target>
+	<target name="getutilities" depends="prepare"
+		description="Checks utility out of svn and copies it to your metacat cvs sandbox">
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${util-module}"
+			tag="${utilities-tag}" dest="${build.tmp}" />
+	</target>
 
-    <target name="advancedsearchjar" depends="compile"
-            description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
-        <delete file="${build.dir}/advancedsearch.jar" />
-        <jar jarfile="${build.dir}/advancedsearch.jar" basedir="${build.dest}"
-             includes="**/metacat/advancedsearch/" />
-    </target>
+	<target name="client" depends="utilities, prepare"
+		description="Compiles metacat-client java code to build dir">
+		<javac srcdir="${build.src}" destdir="${build.dest}"
+			includes="edu/ucsb/nceas/metacat/client/*">
+			<classpath>
+				<path refid="compile.classpath" />
+			</classpath>
+		</javac>
+	</target>
 
-   <target name="harvester" depends="client"
-           description="Compiles harvester java code to build dir">
-       <javac srcdir="${build.src}"
-              destdir="${build.dest}"
-              includes="edu/ucsb/nceas/metacat/harvesterClient/*">
-          <classpath>
-            <path refid="compile.classpath"/>
-          </classpath>
-        </javac>
-   </target>
+	<target name="clientjar" depends="client"
+		description="Compiles and jars metacat-client java code to metacat-client.jar in build dir">
+		<delete file="${build.dir}/${name}-client.jar" />
+		<jar jarfile="${build.dir}/${name}-client.jar"
+			basedir="${build.dest}" includes="**/metacat/client/" />
+	</target>
 
-   <target name="harvesterjar" depends="harvester"
-           description="Compiles and jars harvester java code to harvester.jar in build dir">
-       <delete file="${build.dir}/harvester.jar" />
-       <jar jarfile="${build.dir}/harvester.jar" basedir="${build.dest}"
-            includes="**/metacat/harvesterClient/" />
-   </target>
+	<target name="advancedsearchjar" depends="compile"
+		description="Compiles and jars advanced search Java code to advancedsearch.jar in build dir">
+		<delete file="${build.dir}/advancedsearch.jar" />
+		<jar jarfile="${build.dir}/advancedsearch.jar"
+			basedir="${build.dest}" includes="**/metacat/advancedsearch/" />
+	</target>
 
-   <target name="harvestListEditorDist" depends="harvesterjar"
-           description="Prepares a distribution of the Harvest List Editor tool">
-       <mkdir dir="${dist.dir.hle}"/>
-       <delete dir="${ver.dir.hle}" />
-       <mkdir dir="${ver.dir.hle}"/>
-       <copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar"/>
-       <copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar"/>
-       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestList.xsd"/>
-       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.bat"/>
-       <copy todir="${ver.dir.hle}" file="lib/harvester/harvestListEditor.sh"/>
-       <delete file="./harvest-list-editor-${release}.zip"/>
-       <zip zipfile="./harvest-list-editor-${release}.zip" basedir="${ver.dir.hle}" />
-       <delete file="./harvest-list-editor-${release}.tar.gz" />
-       <tar tarfile="./harvest-list-editor-${release}.tar" basedir="${ver.dir.hle}" />
-       <gzip zipfile="./harvest-list-editor-${release}.tar.gz"
-             src="./harvest-list-editor-${release}.tar"/>
-       <delete file="./harvest-list-editor-${release}.tar" />
-   </target>
-	
-   <target  name="geteml" depends="getemlpre2,geteml2+,getConversionXSL" if="eml.required"
-            description="Calls getemlpre2 and geteml2+ targets" />
+	<target name="harvester" depends="client"
+		description="Compiles harvester java code to build dir">
+		<javac srcdir="${build.src}" destdir="${build.dest}"
+			includes="edu/ucsb/nceas/metacat/harvesterClient/*">
+			<classpath>
+				<path refid="compile.classpath" />
+			</classpath>
+		</javac>
+	</target>
 
-   <target name="getemlpre2" depends="prepare" if="eml.required"
-   description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
-     <echo>Enter CVS password: </echo>
-     <cvs cvsRoot="${cvsroot}"
-          package="${eml-module}"
-          tag="${eml-beta-tag}"
-          dest="${build.tmp}/eml_${eml-beta-tag}" />
-     <mkdir dir="lib/dtd" />
-     <copy todir="lib/dtd" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${eml-beta-tag}/${eml-module}">
-         <include name="*.dtd"/>
-       </fileset>
-       <mapper type="glob" from="eml-*.dtd" to="eml-*-${eml-version}.dtd" />
-     </copy>
+	<target name="harvesterjar" depends="harvester"
+		description="Compiles and jars harvester java code to harvester.jar in build dir">
+		<delete file="${build.dir}/harvester.jar" />
+		<jar jarfile="${build.dir}/harvester.jar"
+			basedir="${build.dest}" includes="**/metacat/harvesterClient/" />
+	</target>
 
-     <copy todir="${style-common-cvsrelpath}" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${eml-beta-tag}/${eml-module}/style">
-       <include name="**/*.xsl"/>
-     </fileset>
-     </copy>
-   </target>
+	<target name="harvestListEditorDist" depends="harvesterjar"
+		description="Prepares a distribution of the Harvest List Editor tool">
+		<mkdir dir="${dist.dir.hle}" />
+		<delete dir="${ver.dir.hle}" />
+		<mkdir dir="${ver.dir.hle}" />
+		<copy todir="${ver.dir.hle}" file="${build.dir}/harvester.jar" />
+		<copy todir="${ver.dir.hle}" file="lib/xercesImpl.jar" />
+		<copy todir="${ver.dir.hle}"
+			file="lib/harvester/harvestList.xsd" />
+		<copy todir="${ver.dir.hle}"
+			file="lib/harvester/harvestListEditor.bat" />
+		<copy todir="${ver.dir.hle}"
+			file="lib/harvester/harvestListEditor.sh" />
+		<delete file="./harvest-list-editor-${release}.zip" />
+		<zip zipfile="./harvest-list-editor-${release}.zip"
+			basedir="${ver.dir.hle}" />
+		<delete file="./harvest-list-editor-${release}.tar.gz" />
+		<tar tarfile="./harvest-list-editor-${release}.tar"
+			basedir="${ver.dir.hle}" />
+		<gzip zipfile="./harvest-list-editor-${release}.tar.gz"
+			src="./harvest-list-editor-${release}.tar" />
+		<delete file="./harvest-list-editor-${release}.tar" />
+	</target>
 
-   <target name="geteml2+" depends="prepare" if="eml.required"
-   description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
-     <echo>Enter CVS password: </echo>
-     <cvs cvsRoot="${cvsroot}"
-          package="${eml-module}"
-          tag="${eml2_0_0-schema-tag}"
-          dest="${build.tmp}/eml_${eml2_0_0-schema-tag}" />
-     <mkdir dir="lib/schema/eml-2.0.0" />
-     <copy todir="lib/schema/eml-2.0.0" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${eml2_0_0-schema-tag}/${eml-module}">
-         <include name="*.xsd"/>
-       </fileset>
+	<target name="geteml" depends="getemlpre2,geteml2+,getConversionXSL"
+		if="eml.required" description="Calls getemlpre2 and geteml2+ targets" />
 
-       <!-- shouldn't we have a mapper here like this??
-       <mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
+	<target name="getemlpre2" depends="prepare" if="eml.required"
+		description="Checks EML-beta6 out of cvs and copies dtds and xsl to your metacat cvs sandbox">
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${eml-module}"
+			tag="${eml-beta-tag}" dest="${build.tmp}/eml_${eml-beta-tag}" />
+		<mkdir dir="lib/dtd" />
+		<copy todir="lib/dtd" filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${eml-beta-tag}/${eml-module}">
+				<include name="*.dtd" />
+			</fileset>
+			<mapper type="glob" from="eml-*.dtd"
+				to="eml-*-${eml-version}.dtd" />
+		</copy>
 
-       Jing's code didn't nave one - does it need to be added?
-       NOTE that eml-version is set to beta 6, so this would need changing -->
+		<copy todir="${style-common-cvsrelpath}" filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${eml-beta-tag}/${eml-module}/style">
+				<include name="**/*.xsl" />
+			</fileset>
+		</copy>
+	</target>
 
-     </copy>
-     <!-- <antcall target="copyxsl">
-        <param name="cvs.tagname" value="${eml2_0_0-schema-tag}" />
-        <param name="dirname" value="eml-2.0.0" />
-     </antcall> -->
-   	
-   	<!-- Checkout eml201 for given schema tag-->
-     <echo>Enter CVS password: </echo>
-     <cvs cvsRoot="${cvsroot}"
-          package="${eml-module}"
-          tag="${eml2_0_1-schema-tag}"
-          dest="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
-     <mkdir dir="lib/schema/eml-2.0.1" />
-     <copy todir="lib/schema/eml-2.0.1" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${eml2_0_1-schema-tag}/${eml-module}">
-         <include name="*.xsd"/>
-       </fileset>
-     </copy>
-   	
-   	<!-- Checkout eml201 again for given style sheet tag-->
-   	<!-- echo>Enter CVS password: </echo>
-   	     <cvs cvsRoot="${cvsroot}"
-   	          package="${eml-module}"
-   	          tag="${eml2_0_1-style-tag}"
-   	          dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
-     <antcall target="copyxsl">
-        <param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
-        <param name="dirname" value="eml-2.0.1" />
-     </antcall -->
-	
-   	<!-- Checkout eml210 for given schema tag-->
-     <echo>Enter CVS password: </echo>
-     <cvs cvsRoot="${cvsroot}"
-          package="${eml-module}"
-          tag="${eml2_1_0-schema-tag}"
-          dest="${build.tmp}/eml_${eml2_1_0-schema-tag}" />
-     <mkdir dir="lib/schema/eml-2.1.0" />
-     <copy todir="lib/schema/eml-2.1.0" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${eml2_1_0-schema-tag}/${eml-module}">
-         <include name="*.xsd"/>
-       </fileset>
-     </copy>
-	
-   	<!-- Checkout eml210 for given style sheet tag-->
-   	<echo>Enter CVS password: </echo>
-   	     <cvs cvsRoot="${cvsroot}"
-   	          package="${eml-module}"
-   	          tag="${eml2-style-tag}"
-   	          dest="${build.tmp}/eml_${eml2-style-tag}" />
-     <antcall target="copyxsl">
-        <param name="cvs.tagname" value="${eml2-style-tag}" />
-        <!-- param name="dirname" value="eml-2.1.0" / -->
-        <param name="dirname" value="eml-2" />
-     </antcall>
-   </target>
+	<target name="geteml2+" depends="prepare" if="eml.required"
+		description="Checks eml-2 out of cvs and copies schema and xsl to your metacat cvs sandbox">
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${eml-module}"
+			tag="${eml2_0_0-schema-tag}"
+			dest="${build.tmp}/eml_${eml2_0_0-schema-tag}" />
+		<mkdir dir="lib/schema/eml-2.0.0" />
+		<copy todir="lib/schema/eml-2.0.0" filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${eml2_0_0-schema-tag}/${eml-module}">
+				<include name="*.xsd" />
+			</fileset>
 
-   <target  name="copyxsl"
-   description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
+			<!-- shouldn't we have a mapper here like this??
+				<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" />
+				
+				Jing's code didn't nave one - does it need to be added?
+				NOTE that eml-version is set to beta 6, so this would need changing -->
 
-     <delete file="${style-common-cvsrelpath}/${eml-css}"/>
+		</copy>
+		<!-- <antcall target="copyxsl">
+			<param name="cvs.tagname" value="${eml2_0_0-schema-tag}" />
+			<param name="dirname" value="eml-2.0.0" />
+			</antcall> -->
 
-     <copy todir="${style-common-cvsrelpath}/${dirname}" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
-       <include name="**/*.xsl"/>
-     </fileset>
-     </copy>
+		<!-- Checkout eml201 for given schema tag-->
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${eml-module}"
+			tag="${eml2_0_1-schema-tag}"
+			dest="${build.tmp}/eml_${eml2_0_1-schema-tag}" />
+		<mkdir dir="lib/schema/eml-2.0.1" />
+		<copy todir="lib/schema/eml-2.0.1" filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${eml2_0_1-schema-tag}/${eml-module}">
+				<include name="*.xsd" />
+			</fileset>
+		</copy>
 
+		<!-- Checkout eml201 again for given style sheet tag-->
+		<!-- echo>Enter CVS password: </echo>
+			<cvs cvsRoot="${cvsroot}"
+			package="${eml-module}"
+			tag="${eml2_0_1-style-tag}"
+			dest="${build.tmp}/eml_${eml2_0_1-style-tag}" />
+			<antcall target="copyxsl">
+			<param name="cvs.tagname" value="${eml2_0_1-style-tag}" />
+			<param name="dirname" value="eml-2.0.1" />
+			</antcall -->
 
-     <!-- now copy default css from eml module and put it in style-common-path
-          dir with a new name, so other skin-specific css can import it if reqd -->
-     <copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
-           tofile="${style-common-cvsrelpath}/${eml-css}" />
+		<!-- Checkout eml210 for given schema tag-->
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${eml-module}"
+			tag="${eml2_1_0-schema-tag}"
+			dest="${build.tmp}/eml_${eml2_1_0-schema-tag}" />
+		<mkdir dir="lib/schema/eml-2.1.0" />
+		<copy todir="lib/schema/eml-2.1.0" filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${eml2_1_0-schema-tag}/${eml-module}">
+				<include name="*.xsd" />
+			</fileset>
+		</copy>
 
-   </target>
-	
-   <target name="correctEML201Docs" depends="jar"
-		            description="Uses the ant  task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
-	   	<copy todir="${build.dir}" file="lib/metacat.properties" filtering="yes"/>    
-	   	 <java classname="edu.ucsb.nceas.metacat.EML201DocumentCorrector" >
-		         <classpath>
-		          <path refid="compile.classpath"/>
-		          <fileset dir="${build.dir}">
-		            <include name="${name}.jar"/>
-		          </fileset>
-		        </classpath>
-		      </java>
-   </target>
+		<!-- Checkout eml210 for given style sheet tag-->
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${eml-module}"
+			tag="${eml2-style-tag}" dest="${build.tmp}/eml_${eml2-style-tag}" />
+		<antcall target="copyxsl">
+			<param name="cvs.tagname" value="${eml2-style-tag}" />
+			<!-- param name="dirname" value="eml-2.1.0" / -->
+			<param name="dirname" value="eml-2" />
+		</antcall>
+	</target>
 
-   <target name="install-spatial" depends="jar,clientjar,harvesterjar"
-           description="Installs spatial option for metacat">
+	<target name="copyxsl"
+		description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox">
 
-      <property name="spatial.dir" value="./lib/spatial"/>
-      <property name="spatial.geoserver.dir" value="${spatial.dir}/geoserver"/>
-      <property name="spatial.webinf-mods" value="${spatial.dir}/WEB-INF"/>
+		<delete file="${style-common-cvsrelpath}/${eml-css}" />
 
-      <!-- Copy geoserver libs into ${war.lib} -->
-      <copy todir="${war.lib}" filtering="no">
-        <fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
-          <include name="**"/>
-        </fileset>
-      </copy>
+		<copy todir="${style-common-cvsrelpath}/${dirname}"
+			filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style/eml">
+				<include name="**/*.xsl" />
+			</fileset>
+		</copy>
 
-      <!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
-      <copy todir="${war.webinf}" filtering="no">
-        <fileset dir="${spatial.geoserver.dir}/WEB-INF">
-          <exclude name="lib/**"/>
-          <exclude name="web.xml"/>
-        </fileset>
-      </copy>
 
-      <!-- Copy the rest of the geoserver codebase into ${war.context} -->
-      <copy todir="${war.context}" filtering="no">
-        <fileset dir="${spatial.geoserver.dir}">
-          <exclude name="WEB-INF/**"/>
-          <exclude name="index.jsp"/>
-        </fileset>
-      </copy>
+		<!-- now copy default css from eml module and put it in style-common-path
+			dir with a new name, so other skin-specific css can import it if reqd -->
+		<copy
+			file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}"
+			tofile="${style-common-cvsrelpath}/${eml-css}" />
 
-      <!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat   -->
-     <copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
-          tofile="${war.context}/geoserver.jsp"
-          overwrite="true"
-          filtering="no"/>
+	</target>
 
-      <!-- Copy the rest of the modified geoserver web-inf files
-      <copy todir="${war.webinf}" filtering="no">
-        <fileset dir="${spatial.webinf-mods}">
-          <exclude name="web.xml.combined"/>
-        </fileset>
-      </copy> -->
+	<target name="correctEML201Docs" depends="jar"
+		description="Uses the ant  task to run a JAVA patch class to correct invalide eml201 documents which were generated by wrong schema">
+		<copy todir="${build.dir}" file="lib/metacat.properties"
+			filtering="yes" />
+		<java
+			classname="edu.ucsb.nceas.metacat.EML201DocumentCorrector">
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+				</fileset>
+			</classpath>
+		</java>
+	</target>
 
-    </target>
+	<target name="install-spatial" depends="jar,clientjar,harvesterjar"
+		description="Installs spatial option for metacat">
 
-   <target name="install" depends="build-metacat" description="* Full Install For Development *">
-     <copy file="${dist.dir}/${metacat.context}.war" todir="${app.deploy.dir}"/>
-   	 <delete dir="${app.deploy.dir}/${metacat.context}" />
-   	   <tstamp>
-   	   	 <format property="NOW" pattern="MM/dd/yyyy hh:mm:ss aa"/>
-   	   </tstamp>
-   	 <echo>Dev install completed at ${NOW}</echo> 	   	
-   </target>
+		<property name="spatial.dir" value="./lib/spatial" />
+		<property name="spatial.geoserver.dir"
+			value="${spatial.dir}/geoserver" />
+		<property name="spatial.webinf-mods"
+			value="${spatial.dir}/WEB-INF" />
 
-   <target name="build-metacat" depends="install-ecogrid"
-   	            description="Build Metacat">
-   </target>
-	
-   <target name="install-ecogrid" depends="warPrepare, get-ecogrid" if="enable.ecogrid"
-			    description="Install Ecogrid Compentent">
-   	  <ant antfile="build.xml" dir="${ecogrid-dir}" target ="clean" inheritall="false">
-   	         <property name="context" value="${metacat.context}"/>
-   	   	     <property name="target" value="${ecogrid-target-name}"/>
-   	   	     <!-- property name="metacat.dir" value="."/ -->
-   	  </ant>
-   	  <ant antfile="build.xml" dir="${ecogrid-dir}" target ="war" inheritall="false">
-   	     <property name="context" value="${metacat.context}"/>
-   	     <property name="target" value="${ecogrid-target-name}"/>
-   	     <!-- property name="metacat.dir" value="."/ -->
-   	  </ant>
-   	  <!-- war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
-  	      <webinf dir="${ecogrid-dir}/lib">
-   	        <include name="server-config.wsdd"/>
-   	      </webinf>
-   	  </war -->
-   	  <copy file="${ecogrid-dir}/build/${metacat.context}.war" todir="${dist.dir}" overwrite="true"/>
-   	  
-   
-   </target>
-   
-   <target name="get-ecogrid" depends="init" description="Check out ecogrid module" if="ecogrid.required">
-	     <svn>
-   	    <export srcUrl="${svn.ecogridUrl}" destPath="${ecogrid-dir}" />
-			 </svn>
-   </target>  
-	
-   <!-- target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
-   	 <ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
-   	   	 <property name="context" value="${metacat.context}"/>
-   	   	 <property name="target" value="${ecogrid-target-name}"/>
-   	     <property name="metacat.dir" value="."/>
-   	     <property name="hostname" value="${ecogrid.hostname}"/>
-   	     <property name="port" value="${config.port}"/>
-   	 </ant>
-   </target -->
-	
-   <target name="clean-ecogrid-server-config-wsdd" depends="init" description="Automately generate wsdd for ecogrid service">
-      <delete file="${app.deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd"/>
-   </target>
+		<!-- Copy geoserver libs into ${war.lib} -->
+		<copy todir="${war.lib}" filtering="no">
+			<fileset dir="${spatial.geoserver.dir}/WEB-INF/lib">
+				<include name="**" />
+			</fileset>
+		</copy>
 
-   <!-- target name="install-registry" depends="init,getConversionXSL"
-            description="Install Registry">
+		<!-- Copy everything in geoservers WEB-INF (except the libs) into ${war.webinf} -->
+		<copy todir="${war.webinf}" filtering="no">
+			<fileset dir="${spatial.geoserver.dir}/WEB-INF">
+				<exclude name="lib/**" />
+				<exclude name="web.xml" />
+			</fileset>
+		</copy>
 
-      <mkdir dir="${inst.cgi.dir}" />
-      <copy file="${srcdir}/perl/register-dataset.cgi"
-            todir="${inst.cgi.dir}"/>
-      <chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
+		<!-- Copy the rest of the geoserver codebase into ${war.context} -->
+		<copy todir="${war.context}" filtering="no">
+			<fileset dir="${spatial.geoserver.dir}">
+				<exclude name="WEB-INF/**" />
+				<exclude name="index.jsp" />
+			</fileset>
+		</copy>
 
-      <! - - TODO SCW: set the permissions on this folder to be writable by the apache user - - >
-      <mkdir dir="${temp-dir}" />
-      <! - - TODO SCW: use relative paths to grab these instead of copying to tmp,
-                     used in readDocumentFromMetacat - - >
-      <copy todir="${temp-dir}" filtering="yes">
-       <fileset dir="lib/style/common/emlb6toeml2">
-         <include name="*.xsl"/>
-         <include name="*.xml"/>
-       </fileset>
-      </copy>
+		<!-- Copy the geoserver index.jsp but rename it to avoid conflicting w/metcat   -->
+		<copy file="${spatial.geoserver.dir}/WEB-INF/pages/index.jsp"
+			tofile="${war.context}/geoserver.jsp" overwrite="true"
+			filtering="no" />
 
-      <echo message="Install Registry completed." />
-   </target -->
+		<!-- Copy the rest of the modified geoserver web-inf files
+			<copy todir="${war.webinf}" filtering="no">
+			<fileset dir="${spatial.webinf-mods}">
+			<exclude name="web.xml.combined"/>
+			</fileset>
+			</copy> -->
 
-   <!-- target name="install-ldap" depends="init"
-            description="Install Metacat LDAP Access">
+	</target>
 
-      <mkdir dir="${inst.cgi.dir}" />
-      <copy file="${srcdir}/perl/ldapweb.cgi"
-            todir="${inst.cgi.dir}" />
-      <chmod file="${inst.cgi.dir}/ldapweb.cgi" perm="ugo+x" />
-      <mkdir dir="${templates.dir}" />
-      <copy todir="${templates.dir}">
-        <fileset dir="lib/style/common/templates">
-			< ! - - SCW: Copy all files - - >
-        </fileset>
-      </copy>
-      <echo message="ldapweb install complete." />
-   </target -->
+	<target name="install" depends="build-metacat"
+		description="* Full Install For Development *">
+		<copy file="${dist.dir}/${metacat.context}.war"
+			todir="${app.deploy.dir}" />
+		<delete dir="${app.deploy.dir}/${metacat.context}" />
+		<tstamp>
+			<format property="NOW" pattern="MM/dd/yyyy hh:mm:ss aa" />
+		</tstamp>
+		<echo>Dev install completed at ${NOW}</echo>
+	</target>
 
+	<target name="build-metacat" depends="install-ecogrid"
+		description="Build Metacat">
+	</target>
 
-   <target name="install-skin" depends="init"
-            description="Install a Skin">
+	<target name="install-ecogrid" depends="warPrepare, get-ecogrid"
+		if="enable.ecogrid" description="Install Ecogrid Compentent">
+		<ant antfile="build.xml" dir="${ecogrid-dir}" target="clean"
+			inheritall="false">
+			<property name="context" value="${metacat.context}" />
+			<property name="target" value="${ecogrid-target-name}" />
+			<!-- property name="metacat.dir" value="."/ -->
+		</ant>
+		<ant antfile="build.xml" dir="${ecogrid-dir}" target="war"
+			inheritall="false">
+			<property name="context" value="${metacat.context}" />
+			<property name="target" value="${ecogrid-target-name}" />
+			<!-- property name="metacat.dir" value="."/ -->
+		</ant>
+		<!-- war destfile="${ecogrid-dir}/build/${metacat.context}.war" update="true">
+			<webinf dir="${ecogrid-dir}/lib">
+			<include name="server-config.wsdd"/>
+			</webinf>
+			</war -->
+		<copy file="${ecogrid-dir}/build/${metacat.context}.war"
+			todir="${dist.dir}" overwrite="true" />
 
-      <input message="Please enter name of the skin"
-             addproperty="skin-name"/>
 
-      <mkdir dir="${installdir}/style/skins/${skin-name}" />
-      <copy todir="${installdir}/style/skins/${skin-name}" filtering="yes">
-       <fileset dir="lib/style/skins/${skin-name}">
-           <exclude name="**/*.png"/>
-           <exclude name="**/*.gif"/>
-           <exclude name="**/*.jpg"/>
-           <exclude name="**/CVS*"/>
-           <exclude name="**/.#*"/>
-       </fileset>
-      </copy>
-     <copy todir="${installdir}/style/skins/${skin-name}" filtering="no">
-       <fileset dir="lib/style/skins/${skin-name}">
-           <include name="**/*.png"/>
-           <include name="**/*.gif"/>
-           <include name="**/*.jpg"/>
-           <exclude name="**/CVS*"/>
-           <exclude name="**/.#*"/>
-       </fileset>
-      </copy>
-      <copy todir="${installdir}/style/common" filtering="yes">
-       <fileset dir="lib/style/common">
-           <include name="*.js"/>
-           <include name="*.jsp"/>
-           <include name="*.css"/>
-           <exclude name="*.png"/>
-           <exclude name="*.gif"/>
-           <exclude name="*.jpg"/>
-           <exclude name="**/CVS*"/>
-           <exclude name="**/.#*"/>
-       </fileset>
-      </copy>
-      <!--
-      <mkdir dir="${installdir}/style/skins/${skin-name}/images" />
-     <copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
-       <fileset dir="lib/style/skins/${skin-name}/images">
-           <include name="*.png"/>
-           <include name="*.gif"/>
-           <include name="*.jpg"/>
-       </fileset>
-      </copy>
-      -->
+	</target>
 
-      <echo message="Install Skin completed." />
-   </target>
+	<target name="get-ecogrid" depends="init"
+		description="Check out ecogrid module" if="ecogrid.required">
+		<svn>
+			<export srcUrl="${svn.ecogridUrl}"
+				destPath="${ecogrid-dir}" />
+		</svn>
+	</target>
 
-   <target name="war" depends="warPrepare,install-spatial"
-            description="Create a web archive (WAR) for servlet deployment">
-       <mkdir dir="${dist.dir}" />
-       <war destfile="${dist.dir}/${metacat.context}.war"
-            webxml="${build.war}/web.xml">
-         <fileset dir="${war.context}"/>
-         <lib dir="${war.lib}"/>
-         <webinf dir="${war.webinf}"/>
-       </war>
-   </target>
-	
-   <target name="warPrepare" depends="cgiPrepare,jar,clientjar,harvesterjar,testPrepare"
-            description="Prepare files for creating a web archive (WAR)">
+	<!-- target name="deploy-ecogrid" depends="clean-ecogrid-server-config-wsdd" if="enable.ecogrid" description="Automately generate wsdd for ecogrid service">
+		<ant antfile="build.xml" dir="${ecogrid-dir}" target ="deploy" inheritall="false">
+		<property name="context" value="${metacat.context}"/>
+		<property name="target" value="${ecogrid-target-name}"/>
+		<property name="metacat.dir" value="."/>
+		<property name="hostname" value="${ecogrid.hostname}"/>
+		<property name="port" value="${config.port}"/>
+		</ant>
+		</target -->
 
-       <property name="war.lib" value="${build.war}/lib" />
-       <property name="war.webinf" value="${build.war}/WEB-INF" />
-       <property name="war.context" value="${build.war}/${metacat.context}" />
-   	   <property name="war.webinf.sql" value="${war.webinf}/sql" />
-   	   <property name="war.webinf.scripts" value="${war.webinf}/scripts" />
-	   <property name="war.context.cgi" value="${war.context}/cgi-bin" />
-   	   <property name="war.context.docs" value="${war.context}/docs" />
-   	   <property name="war.context.temp" value="${war.context}/temp" />
-   	   <property name="war.context.templates" value="${war.context}${style-common-relpath}/templates" />
-       <mkdir dir="${war.lib}" />
-       <mkdir dir="${war.webinf}" />
-       <mkdir dir="${war.context}" />
-   	   <mkdir dir="${war.webinf.sql}" />
-	   <mkdir dir="${war.context.cgi}" />
-   	   <mkdir dir="${war.context.docs}" />
-   	   <mkdir dir="${war.context.temp}" />
-       <mkdir dir="${war.context.templates}" />
-       
-	   <!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
-       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
-       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
-       <!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
-       <copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
-       <copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
-       <copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
-       <copy todir="${war.lib}" filtering="no">
-         <fileset dir="lib">
-<!--
-         	<not>
-               <filename name="${jdbc-jar-name}"/>
-            </not>
--->
-            <include name="*.jar"/>
-         </fileset>
-         <fileset dir="lib">
-           <include name="xalan.jar"/>
-           <include name="gwt*.jar"/>
-         </fileset>
-         <fileset dir="lib/oaipmh">
-           <include name="oaicat.jar"/>
-         </fileset>
-       </copy>
-       <!-- MCD copy file="lib/web.xml.${tomcatversion}"
-             tofile="${build.war}/web.xml" / -->
-       <!-- MCD added next - Remove the tomcat5 reference-->
-   	   <copy file="lib/web.xml.tomcat5"
-   	             tofile="${build.war}/web.xml"/>
-       <copy file="lib/metacat.properties" todir="${war.webinf}"
-             filtering="yes" />
-   	   <copy file="lib/metacat.properties.metadata.xml" todir="${war.webinf}"
-   	             filtering="no" />
-	   <copy file="lib/org.properties.metadata.xml" todir="${war.webinf}"
-	             filtering="no" />
-	   <copy file="lib/auth.properties.metadata.xml" todir="${war.webinf}"
-	             filtering="no" />
-       <copy todir="${war.webinf}" filtering="yes">
-	   	  <fileset dir="lib">
-           <include name="skin.configs/**"/>
-		  </fileset>
-	   </copy>
-       <copy file="lib/log4j.properties" todir="${war.webinf}"
-             filtering="yes" />
-       <copy todir="${war.context}" filtering="no">
-         <fileset dir="lib">
-           <include name="**/*.jpg"/>
-           <include name="**/*.png"/>
-           <include name="**/*.gif"/>
-           <include name="LiveMap_30/**"/>
-           <include name="oaipmh/**"/>
-         </fileset>
-       </copy>
-       <copy todir="${war.context}" filtering="yes">
-         <fileset dir="lib">
-           <exclude name="*.jar"/>
-           <exclude name="*.properties"/>
-         	<exclude name="*.metadata.xml"/>
-           <exclude name="web.xml"/>
-           <exclude name="**/*.jpg"/>
-           <exclude name="**/*.png"/>
-           <exclude name="**/*.gif"/>
-           <exclude name="lsid_lib/**"/>
-           <exclude name="lsid_conf/**"/>
-           <exclude name="LiveMap_30/**"/>
-           <exclude name="oaipmh/**"/>
-           <exclude name="skin.configs/**"/>
-           <exclude name="spatial/geoserver/**"/>
-           <exclude name="spatial/WEB-INF/**"/>
-         </fileset>
-       </copy>
-       <copy todir="${war.context.docs}" filtering="yes">
-          <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
-       </copy>
-       <copy todir="${war.context.docs}" filtering="no">
-          <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
-       </copy>
-	   <copy todir="${war.webinf.sql}" filtering="yes">
-	         <fileset dir="src">
-	           <include name="**/*.sql"/>
-	         </fileset>
-	   </copy>
-	   <copy todir="${war.webinf.scripts}" filtering="yes">
-	         <fileset dir="src/scripts"/>
-	   </copy>
-       <copy todir="${war.webinf.scripts}" 
-             file="src/perl/Metacat/blib/lib/auto/Metacat/autosplit.ix"
-             failonerror="false"/>
-   	
-   	   <copy file="src/perl/register-dataset.cgi" todir="${war.context.cgi}"/>
-	   <copy file="src/perl/ldapweb.cgi" todir="${war.context.cgi}" />
-	   <copy file="src/perl/Metacat/Metacat.pm" todir="${war.lib}" />
-   	
-	   <!-- registry cgi section -->
-	   <!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
-                   used in readDocumentFromMetacat -->
-	   <!-- TODO MCD copy temp files to actual location using config util?? -->
-	   <copy todir="${war.context.temp}" filtering="yes">
-		  <fileset dir="lib/style/common/emlb6toeml2">
- 		    <include name="*.xsl"/>
-			<include name="*.xml"/>
-		  </fileset>
-	    </copy>
-	    <available file="lib/style/common/emlb6toeml2" type="dir"
-                 property="styles.not.needed"/>
-	
-	    <!-- ldap cgi section -->
-	    <copy todir="${war.context.templates}">
-		    <fileset dir="lib/style/common/templates">
-			    <!-- SCW: Copy all files -->
-		    </fileset>
-	    </copy>
-    </target>
-	
-	<target name="cgiPrepare" if="build.perl">	
-		<exec dir="src/perl/Metacat/" executable="make" >
+	<target name="clean-ecogrid-server-config-wsdd" depends="init"
+		description="Automately generate wsdd for ecogrid service">
+		<delete
+			file="${app.deploy.dir}/${metacat.context}/WEB-INF/server-config.wsdd" />
+	</target>
+
+	<!-- target name="install-registry" depends="init,getConversionXSL"
+		description="Install Registry">
+		
+		<mkdir dir="${inst.cgi.dir}" />
+		<copy file="${srcdir}/perl/register-dataset.cgi"
+		todir="${inst.cgi.dir}"/>
+		<chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" />
+		
+		<! - - TODO SCW: set the permissions on this folder to be writable by the apache user - - >
+		<mkdir dir="${temp-dir}" />
+		<! - - TODO SCW: use relative paths to grab these instead of copying to tmp,
+		used in readDocumentFromMetacat - - >
+		<copy todir="${temp-dir}" filtering="yes">
+		<fileset dir="lib/style/common/emlb6toeml2">
+		<include name="*.xsl"/>
+		<include name="*.xml"/>
+		</fileset>
+		</copy>
+		
+		<echo message="Install Registry completed." />
+		</target -->
+
+	<!-- target name="install-ldap" depends="init"
+		description="Install Metacat LDAP Access">
+		
+		<mkdir dir="${inst.cgi.dir}" />
+		<copy file="${srcdir}/perl/ldapweb.cgi"
+		todir="${inst.cgi.dir}" />
+		<chmod file="${inst.cgi.dir}/ldapweb.cgi" perm="ugo+x" />
+		<mkdir dir="${templates.dir}" />
+		<copy todir="${templates.dir}">
+		<fileset dir="lib/style/common/templates">
+		< ! - - SCW: Copy all files - - >
+		</fileset>
+		</copy>
+		<echo message="ldapweb install complete." />
+		</target -->
+
+
+	<target name="install-skin" depends="init"
+		description="Install a Skin">
+
+		<input message="Please enter name of the skin"
+			addproperty="skin-name" />
+
+		<mkdir dir="${installdir}/style/skins/${skin-name}" />
+		<copy todir="${installdir}/style/skins/${skin-name}"
+			filtering="yes">
+			<fileset dir="lib/style/skins/${skin-name}">
+				<exclude name="**/*.png" />
+				<exclude name="**/*.gif" />
+				<exclude name="**/*.jpg" />
+				<exclude name="**/CVS*" />
+				<exclude name="**/.#*" />
+			</fileset>
+		</copy>
+		<copy todir="${installdir}/style/skins/${skin-name}"
+			filtering="no">
+			<fileset dir="lib/style/skins/${skin-name}">
+				<include name="**/*.png" />
+				<include name="**/*.gif" />
+				<include name="**/*.jpg" />
+				<exclude name="**/CVS*" />
+				<exclude name="**/.#*" />
+			</fileset>
+		</copy>
+		<copy todir="${installdir}/style/common" filtering="yes">
+			<fileset dir="lib/style/common">
+				<include name="*.js" />
+				<include name="*.jsp" />
+				<include name="*.css" />
+				<exclude name="*.png" />
+				<exclude name="*.gif" />
+				<exclude name="*.jpg" />
+				<exclude name="**/CVS*" />
+				<exclude name="**/.#*" />
+			</fileset>
+		</copy>
+		<!--
+			<mkdir dir="${installdir}/style/skins/${skin-name}/images" />
+			<copy todir="${installdir}/style/skins/${skin-name}/images" filtering="no">
+			<fileset dir="lib/style/skins/${skin-name}/images">
+			<include name="*.png"/>
+			<include name="*.gif"/>
+			<include name="*.jpg"/>
+			</fileset>
+			</copy>
+		-->
+
+		<echo message="Install Skin completed." />
+	</target>
+
+	<target name="war" depends="warPrepare,install-spatial"
+		description="Create a web archive (WAR) for servlet deployment">
+		<mkdir dir="${dist.dir}" />
+		<war destfile="${dist.dir}/${metacat.context}.war"
+			webxml="${build.war}/web.xml">
+			<fileset dir="${war.context}" />
+			<lib dir="${war.lib}" />
+			<webinf dir="${war.webinf}" />
+		</war>
+	</target>
+
+	<target name="warPrepare"
+		depends="cgiPrepare,jar,clientjar,harvesterjar,testPrepare"
+		description="Prepare files for creating a web archive (WAR)">
+
+		<property name="war.lib" value="${build.war}/lib" />
+		<property name="war.webinf" value="${build.war}/WEB-INF" />
+		<property name="war.context"
+			value="${build.war}/${metacat.context}" />
+		<property name="war.webinf.sql" value="${war.webinf}/sql" />
+		<property name="war.webinf.scripts"
+			value="${war.webinf}/scripts" />
+		<property name="war.context.cgi" value="${war.context}/cgi-bin" />
+		<property name="war.context.docs" value="${war.context}/docs" />
+		<property name="war.context.temp" value="${war.context}/temp" />
+		<property name="war.context.templates"
+			value="${war.context}${style-common-relpath}/templates" />
+		<mkdir dir="${war.lib}" />
+		<mkdir dir="${war.webinf}" />
+		<mkdir dir="${war.context}" />
+		<mkdir dir="${war.webinf.sql}" />
+		<mkdir dir="${war.context.cgi}" />
+		<mkdir dir="${war.context.docs}" />
+		<mkdir dir="${war.context.temp}" />
+		<mkdir dir="${war.context.templates}" />
+
+		<!--copy file="${lib.dir}/${jdbc.lib.postgres}" todir="${war.lib}" / -->
+		<!--copy file="${lib.dir}/${jdbc.lib.sqlserver1}" todir="${war.lib}" / -->
+		<!--copy file="${lib.dir}/${jdbc.lib.sqlserver2}" todir="${war.lib}" / -->
+		<!--copy file="${lib.dir}/${jdbc.lib.sqlserver3}" todir="${war.lib}" / -->
+		<copy file="${build.dir}/${name}.jar" todir="${war.lib}" />
+		<copy file="${build.dir}/${name}-client.jar" todir="${war.lib}" />
+		<copy file="${build.dir}/harvester.jar" todir="${war.lib}" />
+		<copy todir="${war.lib}" filtering="no">
+			<fileset dir="lib">
+				<!--
+					<not>
+					<filename name="${jdbc-jar-name}"/>
+					</not>
+				-->
+				<include name="*.jar" />
+			</fileset>
+			<fileset dir="lib">
+				<include name="xalan.jar" />
+				<include name="gwt*.jar" />
+			</fileset>
+			<fileset dir="lib/oaipmh">
+				<include name="oaicat.jar" />
+			</fileset>
+		</copy>
+		<!-- MCD copy file="lib/web.xml.${tomcatversion}"
+			tofile="${build.war}/web.xml" / -->
+		<!-- MCD added next - Remove the tomcat5 reference-->
+		<copy file="lib/web.xml.tomcat5" tofile="${build.war}/web.xml" />
+		<copy file="lib/metacat.properties" todir="${war.webinf}"
+			filtering="yes" />
+		<copy file="lib/metacat.properties.metadata.xml"
+			todir="${war.webinf}" filtering="no" />
+		<copy file="lib/org.properties.metadata.xml"
+			todir="${war.webinf}" filtering="no" />
+		<copy file="lib/auth.properties.metadata.xml"
+			todir="${war.webinf}" filtering="no" />
+		<copy todir="${war.webinf}" filtering="yes">
+			<fileset dir="lib">
+				<include name="skin.configs/**" />
+			</fileset>
+		</copy>
+		<copy file="lib/log4j.properties" todir="${war.webinf}"
+			filtering="yes" />
+		<copy todir="${war.context}" filtering="no">
+			<fileset dir="lib">
+				<include name="**/*.jpg" />
+				<include name="**/*.png" />
+				<include name="**/*.gif" />
+				<include name="LiveMap_30/**" />
+				<include name="oaipmh/**" />
+			</fileset>
+		</copy>
+		<copy todir="${war.context}" filtering="yes">
+			<fileset dir="lib">
+				<exclude name="*.jar" />
+				<exclude name="*.properties" />
+				<exclude name="*.metadata.xml" />
+				<exclude name="web.xml" />
+				<exclude name="**/*.jpg" />
+				<exclude name="**/*.png" />
+				<exclude name="**/*.gif" />
+				<exclude name="lsid_lib/**" />
+				<exclude name="lsid_conf/**" />
+				<exclude name="LiveMap_30/**" />
+				<exclude name="oaipmh/**" />
+				<exclude name="skin.configs/**" />
+				<exclude name="spatial/geoserver/**" />
+				<exclude name="spatial/WEB-INF/**" />
+			</fileset>
+		</copy>
+		<copy todir="${war.context.docs}" filtering="yes">
+			<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
+		</copy>
+		<copy todir="${war.context.docs}" filtering="no">
+			<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
+		</copy>
+		<copy todir="${war.webinf.sql}" filtering="yes">
+			<fileset dir="src">
+				<include name="**/*.sql" />
+			</fileset>
+		</copy>
+		<copy todir="${war.webinf.scripts}" filtering="yes">
+			<fileset dir="src/scripts" />
+		</copy>
+		<copy todir="${war.webinf.scripts}"
+			file="src/perl/Metacat/blib/lib/auto/Metacat/autosplit.ix"
+			failonerror="false" />
+
+		<copy file="src/perl/register-dataset.cgi"
+			todir="${war.context.cgi}" />
+		<copy file="src/perl/ldapweb.cgi" todir="${war.context.cgi}" />
+		<copy file="src/perl/Metacat/Metacat.pm" todir="${war.lib}" />
+
+		<!-- registry cgi section -->
+		<!-- TODO SCW: use relative paths to grab these instead of copying to tmp,
+			used in readDocumentFromMetacat -->
+		<!-- TODO MCD copy temp files to actual location using config util?? -->
+		<copy todir="${war.context.temp}" filtering="yes">
+			<fileset dir="lib/style/common/emlb6toeml2">
+				<include name="*.xsl" />
+				<include name="*.xml" />
+			</fileset>
+		</copy>
+		<available file="lib/style/common/emlb6toeml2" type="dir"
+			property="styles.not.needed" />
+
+		<!-- ldap cgi section -->
+		<copy todir="${war.context.templates}">
+			<fileset dir="lib/style/common/templates">
+				<!-- SCW: Copy all files -->
+			</fileset>
+		</copy>
+	</target>
+
+	<target name="cgiPrepare" if="build.perl">
+		<exec dir="src/perl/Metacat/" executable="make">
 			<arg value="clean" />
-		</exec>	
-		<exec dir="src/perl/Metacat/" executable="perl" >
+		</exec>
+		<exec dir="src/perl/Metacat/" executable="perl">
 			<arg value="Makefile.PL" />
 		</exec>
 		<exec dir="src/perl/Metacat/" executable="make" />
 	</target>
-	
+
 	<target name="testPrepare"
 		description="Copies test files into the war directories">
 		<echo>in testPrepare</echo>
-		<property name="war.context.test" value="${build.war}/${metacat.context}/test" />
+		<property name="war.context.test"
+			value="${build.war}/${metacat.context}/test" />
 		<mkdir dir="${war.context.test}" />
-	    <copy todir="${war.context.test}" filtering="yes">
-		   <fileset dir="test/servertestfiles">
-	          <include name="*/**"/>
-		   </fileset>
+		<copy todir="${war.context.test}" filtering="yes">
+			<fileset dir="test/servertestfiles">
+				<include name="*/**" />
+			</fileset>
 		</copy>
 	</target>
 
-   <target name="getConversionXSL" depends="prepare"
-            unless="styles.not.needed"
-            description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
+	<target name="getConversionXSL" depends="prepare"
+		unless="styles.not.needed"
+		description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0">
 
-     <echo>Enter CVS password: </echo>
-     <cvs cvsRoot="${cvsroot}"
-          package="${eml-module}"
-          tag="${eml2-style-tag}"
-          dest="${build.tmp}/eml_${eml2-style-tag}" />
+		<echo>Enter CVS password:</echo>
+		<cvs cvsRoot="${cvsroot}" package="${eml-module}"
+			tag="${eml2-style-tag}" dest="${build.tmp}/eml_${eml2-style-tag}" />
 
-     <mkdir dir="lib/style/common/emlb6toeml2" />
-      <copy todir="lib/style/common/emlb6toeml2" filtering="yes">
-       <fileset dir="${build.tmp}/eml_${eml2-style-tag}/${eml-module}/lib/beta6toeml2/xsl">
-         <include name="*.xsl"/>
-         <include name="*.xml"/>
-       </fileset>
-      </copy>
-   </target>
+		<mkdir dir="lib/style/common/emlb6toeml2" />
+		<copy todir="lib/style/common/emlb6toeml2" filtering="yes">
+			<fileset
+				dir="${build.tmp}/eml_${eml2-style-tag}/${eml-module}/lib/beta6toeml2/xsl">
+				<include name="*.xsl" />
+				<include name="*.xml" />
+			</fileset>
+		</copy>
+	</target>
 
-   <target name="testprep" depends="jar,clientjar,harvesterjar">
-      <mkdir dir="${build.tests}"/>
-      <copy todir="${build.tests}" filtering="yes">
-        <fileset dir="${testdir}">
-          <include name="edu/**"/>
-        </fileset>
-      </copy>
-   	  <copy todir="${build.tests}" file="${testdir}/test.properties" filtering="yes"/>
+	<target name="testprep" depends="jar,clientjar,harvesterjar">
+		<mkdir dir="${build.tests}" />
+		<copy todir="${build.tests}" filtering="yes">
+			<fileset dir="${testdir}">
+				<include name="edu/**" />
+			</fileset>
+		</copy>
+		<copy todir="${build.tests}" file="${testdir}/test.properties"
+			filtering="yes" />
 
-      <!-- copy and compile the tests into a jar file -->
-      <javac srcdir="${build.tests}"
-             destdir="${build.tests}"
-             debug="on"
-             includes="**/*.java">
-        <classpath>
-          <path refid="compile.classpath"/>
-          <fileset dir="${build.dir}">
-            <include name="${name}.jar"/>
-            <include name="${name}-client.jar"/>
-            <include name="harvester.jar"/>
-          </fileset>
-        </classpath>
-      </javac>
+		<!-- copy and compile the tests into a jar file -->
+		<javac srcdir="${build.tests}" destdir="${build.tests}"
+			debug="on" includes="**/*.java">
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+					<include name="${name}-client.jar" />
+					<include name="harvester.jar" />
+				</fileset>
+			</classpath>
+		</javac>
 
-      <jar jarfile="${build.dir}/${name}-junittests.jar"
-        basedir="${build.tests}"
-                includes="**/*.class" />
-   </target>
+		<jar jarfile="${build.dir}/${name}-junittests.jar"
+			basedir="${build.tests}" includes="**/*.class" />
+	</target>
 
-   <target name="test" depends="testprep"
-            description="Uses the ant junit task to run all JUnit tests">
+	<target name="test" depends="testprep"
+		description="Uses the ant junit task to run all JUnit tests">
 
-      <!-- use the ant "junit" task to run JUnit tests. -->
-      <junit printsummary="yes" haltonfailure="no" fork="yes"
-             haltonerror="no">
-        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>
-        <classpath>
-          <path refid="compile.classpath"/>
-          <fileset dir="${build.dir}">
-            <include name="${name}.jar"/>
-            <include name="${name}-client.jar"/>
-            <include name="harvester.jar"/>
-            <include name="${name}-junittests.jar"/>
-          </fileset>
-        </classpath>
+		<!-- use the ant "junit" task to run JUnit tests. -->
+		<junit printsummary="yes" haltonfailure="no" fork="yes"
+			haltonerror="no">
+			<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+					<include name="${name}-client.jar" />
+					<include name="harvester.jar" />
+					<include name="${name}-junittests.jar" />
+				</fileset>
+			</classpath>
 
-        <formatter type="plain" />
+			<formatter type="plain" />
 
-        <batchtest fork="yes" todir="${build.dir}">
-          <fileset dir="${build.tests}">
-            <include name="**/*.class"/>
-          	<exclude name="**/MCTestCase.class" />
-          	<exclude name="**/ClientViewHelperTest.class" />
-          </fileset>
-        </batchtest>
-     </junit>
-   </target>
+			<batchtest fork="yes" todir="${build.dir}">
+				<fileset dir="${build.tests}">
+					<include name="**/*.class" />
+					<exclude name="**/MCTestCase.class" />
+					<exclude name="**/ClientViewHelperTest.class" />
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
 
-    <target name="runonetest" depends="testprep"
-            description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
+	<target name="runonetest" depends="testprep"
+		description="Uses the ant junit task to run a single JUnit test, defined by the ${testtorun} property">
 
-              <echo>testtorun: ${testtorun}</echo>
+		<echo>testtorun: ${testtorun}</echo>
 
-      <!-- use the ant "junit" task to run JUnit tests. -->
-      <junit printsummary="yes" haltonfailure="no" fork="yes"
-             haltonerror="no" showoutput="yes">
-        <!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
-        <classpath>
-          <path refid="compile.classpath"/>
-          <fileset dir="${build.dir}">
-            <include name="${name}.jar"/>
-            <include name="${name}-client.jar"/>
-            <include name="harvester.jar"/>
-            <include name="${name}-junittests.jar"/>
-          </fileset>
-        </classpath>
+		<!-- use the ant "junit" task to run JUnit tests. -->
+		<junit printsummary="yes" haltonfailure="no" fork="yes"
+			haltonerror="no" showoutput="yes">
+			<!--<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient"/>-->
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+					<include name="${name}-client.jar" />
+					<include name="harvester.jar" />
+					<include name="${name}-junittests.jar" />
+				</fileset>
+			</classpath>
 
-        <formatter type="plain" />
+			<formatter type="plain" />
 
-        <batchtest fork="yes" todir="${build.dir}">
-          <fileset dir="${build.tests}">
-            <include name="**/${testtorun}.class" />
-          </fileset>
-        </batchtest>
-     </junit>
-   </target>
+			<batchtest fork="yes" todir="${build.dir}">
+				<fileset dir="${build.tests}">
+					<include name="**/${testtorun}.class" />
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
 
-   <target name="testharvester"
-           depends="testprep"
-           description="Uses the ant junit task to test only the Harvester code">
-     <junit printsummary="yes"
-            haltonfailure="off"
-            fork="yes"
-            haltonerror="off">
-        <classpath>
-          <path refid="compile.classpath"/>
-          <fileset dir="${build.dir}">
-            <include name="${name}.jar"/>
-            <include name="${name}-client.jar"/>
-            <include name="harvester.jar"/>
-            <include name="${name}-junittests.jar"/>
-          </fileset>
-        </classpath>
-       <formatter type="plain" />
-       <batchtest fork="yes" todir="${build.dir}">
-         <fileset dir="${build.tests}">
-           <include name="**/harvesterClient/*.class" />
-         </fileset>
-       </batchtest>
-     </junit>
-   </target>
+	<target name="testharvester" depends="testprep"
+		description="Uses the ant junit task to test only the Harvester code">
+		<junit printsummary="yes" haltonfailure="off" fork="yes"
+			haltonerror="off">
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+					<include name="${name}-client.jar" />
+					<include name="harvester.jar" />
+					<include name="${name}-junittests.jar" />
+				</fileset>
+			</classpath>
+			<formatter type="plain" />
+			<batchtest fork="yes" todir="${build.dir}">
+				<fileset dir="${build.tests}">
+					<include name="**/harvesterClient/*.class" />
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
 
-  <target name="gethttpclient" depends="prepare"
-            description="checks out and compiles morpho httpclient code">
-  <!--mkdir dir="${morphosourcedir}" -->
-        <cvs cvsRoot="${cvsroot}"
-             package="morpho"
-             dest="." />
-        <ant dir="${morphosourcedir}" inheritAll="false"  target="jar" />
-   </target>
+	<target name="gethttpclient" depends="prepare"
+		description="checks out and compiles morpho httpclient code">
+		<!--mkdir dir="${morphosourcedir}" -->
+		<cvs cvsRoot="${cvsroot}" package="morpho" dest="." />
+		<ant dir="${morphosourcedir}" inheritAll="false" target="jar" />
+	</target>
 
-   <!-- run this target, we need to check out a another morpho souce dir was checked out. -->
-   <target name="nettest" depends="install"
-            description="compiles and runs the metacatnettest code">
+	<!-- run this target, we need to check out a another morpho souce dir was checked out. -->
+	<target name="nettest" depends="install"
+		description="compiles and runs the metacatnettest code">
 
-      <echo>***********************************
-      Please run ant gethttpclient first!
-      ***********************************
-      </echo>
-      <!-- copy and compile the tests into a jar file -->
-      <mkdir dir="${build.metacatnettest}"/>
-      <javac srcdir="${junitnettestsdir}"
-             destdir="${build.metacatnettest}"
-             includes="**/*.java">
-        <classpath>
-          <path refid="compile.classpath"/>
-          <fileset dir="${build.dir}">
-            <include name="${name}.jar"/>
-          </fileset>
-        </classpath>
-      </javac>
+		<echo>
+			*********************************** Please run ant
+			gethttpclient first! ***********************************
+		</echo>
+		<!-- copy and compile the tests into a jar file -->
+		<mkdir dir="${build.metacatnettest}" />
+		<javac srcdir="${junitnettestsdir}"
+			destdir="${build.metacatnettest}" includes="**/*.java">
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+				</fileset>
+			</classpath>
+		</javac>
 
-      <jar jarfile="${build.dir}/${name}-junitnettests.jar"
-                    basedir="${build.metacatnettest}"
-                    includes="**/*.class" />
+		<jar jarfile="${build.dir}/${name}-junitnettests.jar"
+			basedir="${build.metacatnettest}" includes="**/*.class" />
 
-      <!-- use the ant "junit" task to run JUnit tests. -->
-      <junit printsummary="yes" haltonfailure="no" fork="yes"
-             haltonerror="no">
-        <jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
-        <classpath>
-          <path refid="compile.classpath"/>
-          <fileset dir="${build.dir}">
-            <include name="${name}.jar"/>
-            <include name="${name}-junitnettests.jar"/>
-          </fileset>
-        </classpath>
+		<!-- use the ant "junit" task to run JUnit tests. -->
+		<junit printsummary="yes" haltonfailure="no" fork="yes"
+			haltonerror="no">
+			<jvmarg value="-Djava.protocol.handler.pkgs=HTTPClient" />
+			<classpath>
+				<path refid="compile.classpath" />
+				<fileset dir="${build.dir}">
+					<include name="${name}.jar" />
+					<include name="${name}-junitnettests.jar" />
+				</fileset>
+			</classpath>
 
-        <formatter type="plain" />
+			<formatter type="plain" />
 
-        <batchtest fork="yes" todir="${build.dir}">
-          <fileset dir="${build.metacatnettest}">
-            <include name="**/*.class" />
-          </fileset>
-        </batchtest>
-     </junit>
-   </target>
+			<batchtest fork="yes" todir="${build.dir}">
+				<fileset dir="${build.metacatnettest}">
+					<include name="**/*.class" />
+				</fileset>
+			</batchtest>
+		</junit>
+	</target>
 
-   <target name="cleanweb" depends="clean"
-            description="deletes tomcat web context dir and all its contents">
-     <delete dir="${installdir}" />
-   </target>
+	<target name="cleanweb" depends="clean"
+		description="deletes tomcat web context dir and all its contents">
+		<delete dir="${installdir}" />
+	</target>
 
 
-   <target name="clean" depends="init"
-            description="deletes build dir and files that can be regenerated form the release">
-       <delete dir="${build.dir}" />
-       <delete dir="${dist.dir}" />
-   </target>
+	<target name="clean" depends="init"
+		description="deletes build dir and files that can be regenerated form the release">
+		<delete dir="${build.dir}" />
+		<delete dir="${dist.dir}" />
+	</target>
 
 	<target name="localclean" depends="clean"
-	            description="deletes even jars that depend on external sources such as stylesheets and jars">
-	       <delete file="lib/httpclient.jar" />
-	       <delete file="lib/utilities.jar" />
-	</target>	
-	
-   <target name="fullclean" depends="localclean"
-            description="deletes code and eml">
-       <delete includeEmptyDirs="true" failonerror="false">
-         <fileset dir="${style-common-cvsrelpath}">
-           <include name="${eml-css}" />
-           <include name="eml-*/*.xsl" />
-           <include name="eml-*" />
-         </fileset>
-       	 <fileset dir="${schema-cvsrelpath}">
-       	   <include name="eml-*/*.xsd" />
-       	 </fileset>
-       	 <fileset dir="${ecogrid-dir}">
-       		<include name="build.properties" />
-       		<include name="buildfiles/metacatImpl.xml" />
-         </fileset>
-       </delete>
-   </target>
+		description="deletes even jars that depend on external sources such as stylesheets and jars">
+		<delete file="lib/httpclient.jar" />
+		<delete file="lib/utilities.jar" />
+	</target>
 
-   <target name="jdoc" depends="prepare"
-            description="generates javadoc documentation">
-       <javadoc packagenames="edu.ucsb.nceas.*"
-           sourcepath="${build.src}"
-           destdir="${build.javadocs}"
-           author="true"
-           version="true"
-           use="true"
-           windowtitle="${Name} API"
-           doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
-           bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;">
-         <classpath>
-           <path refid="compile.classpath"/>
-         </classpath>
-       </javadoc>
-   </target>
+	<target name="fullclean" depends="localclean"
+		description="deletes code and eml">
+		<delete includeEmptyDirs="true" failonerror="false">
+			<fileset dir="${style-common-cvsrelpath}">
+				<include name="${eml-css}" />
+				<include name="eml-*/*.xsl" />
+				<include name="eml-*" />
+			</fileset>
+			<fileset dir="${schema-cvsrelpath}">
+				<include name="eml-*/*.xsd" />
+			</fileset>
+			<fileset dir="${ecogrid-dir}">
+				<include name="build.properties" />
+				<include name="buildfiles/metacatImpl.xml" />
+			</fileset>
+		</delete>
+	</target>
 
-   <target name="dist"
-       depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
-            description="prepares a full release distribution">
-      <mkdir dir="${dist.dir}"/>
-      <delete dir="${ver.dir}" />
-      <mkdir dir="${ver.dir}"/>
-      <copy todir="${ver.dir}">
-        <fileset dir="."
-            excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/** metacat*.tar.gz metacat*.tar metacat*.zip"/>
-      </copy>
-      <copy todir="${ver.dir}" file="build.xml"/>
-      <copy todir="${ver.dir}" file="build.properties"/>
+	<target name="jdoc" depends="prepare"
+		description="generates javadoc documentation">
+		<javadoc packagenames="edu.ucsb.nceas.*"
+			sourcepath="${build.src}" destdir="${build.javadocs}" author="true"
+			version="true" use="true" windowtitle="${Name} API"
+			doctitle="&lt;h1&gt;${Name}&lt;/h1&gt;"
+			bottom="&lt;i&gt;Copyright &#169; 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.&lt;/i&gt;">
+			<classpath>
+				<path refid="compile.classpath" />
+			</classpath>
+		</javadoc>
+	</target>
 
-      <copy todir="${ver.dir}/docs" filtering="yes">
-        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
-      </copy>
-      <copy todir="${ver.dir}/docs" filtering="no">
-        <fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
-      </copy>
-      <copy todir="${ver.dir}/docs/dev">
-        <fileset dir="${build.dir}/docs"/>
-      </copy>
-      <copy todir="${ver.dir}/src">
-        <fileset dir="${build.dir}/src"/>
-      </copy>
-   	
-   	  <mkdir dir="${ver.dir}/tests/servertestfiles"/>
-	  <copy todir="${ver.dir}/test/servertestfiles">
-	    <fileset dir="./test/servertestfiles"/>
-	  </copy>
-  </target>
+	<target name="dist"
+		depends="geteml,get-ecogrid,jar,protocol,jdoc,getConversionXSL,getutilities"
+		description="prepares a full release distribution">
+		<mkdir dir="${dist.dir}" />
+		<delete dir="${ver.dir}" />
+		<mkdir dir="${ver.dir}" />
+		<copy todir="${ver.dir}">
+			<fileset dir="."
+				excludes="**/CVS* **/.#* src/** test/** build/** docs/** ${dist.dir}/** ${dist.dir.hle}/** metacat*.tar.gz metacat*.tar metacat*.zip" />
+		</copy>
+		<copy todir="${ver.dir}" file="build.xml" />
+		<copy todir="${ver.dir}" file="build.properties" />
 
-	<target name="distbin" depends="build-metacat,war-lsid" description="prepares a binary distribution">
+		<copy todir="${ver.dir}/docs" filtering="yes">
+			<fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />
+		</copy>
+		<copy todir="${ver.dir}/docs" filtering="no">
+			<fileset dir="docs" includes="**/*gif **/*jpg **/*png" />
+		</copy>
+		<copy todir="${ver.dir}/docs/dev">
+			<fileset dir="${build.dir}/docs" />
+		</copy>
+		<copy todir="${ver.dir}/src">
+			<fileset dir="${build.dir}/src" />
+		</copy>
+
+		<mkdir dir="${ver.dir}/tests/servertestfiles" />
+		<copy todir="${ver.dir}/test/servertestfiles">
+			<fileset dir="./test/servertestfiles" />
+		</copy>
+	</target>
+
+	<target name="distbin" depends="build-metacat,war-lsid"
+		description="prepares a binary distribution">
 		<copy todir="${dist.dir}">
-			<fileset dir="./src/scripts"  />
-		</copy>	
+			<fileset dir="./src/scripts" />
+		</copy>
 		<delete file="./${name}-bin-${release}.zip" />
-		<zip zipfile="./${name}-bin-${release}.zip" 
-			basedir="${dist.dir}"
-			excludes="metacat-*/**"/>	
+		<zip zipfile="./${name}-bin-${release}.zip"
+			basedir="${dist.dir}" excludes="metacat-*/**" />
 		<delete file="./${name}-bin-${release}.tar.gz" />
-		<tar tarfile="./${name}-bin-${release}.tar" 
-			basedir="${dist.dir}" 
-			excludes="metacat-*/**"/>
-		<gzip zipfile="./${name}-bin-${release}.tar.gz" src="./${name}-bin-${release}.tar" />
+		<tar tarfile="./${name}-bin-${release}.tar"
+			basedir="${dist.dir}" excludes="metacat-*/**" />
+		<gzip zipfile="./${name}-bin-${release}.tar.gz"
+			src="./${name}-bin-${release}.tar" />
 		<delete file="./${name}-bin-${release}.tar" />
 	</target>
-	
-  <target name="distsrc" depends="dist"
-            description="prepares a source distribution">
-      <mkdir dir="${ver.src}"/>
-      <copy todir="${ver.src}">
-        <fileset dir="./src"/>
-      </copy>
-      <mkdir dir="${util.dir}"/>
-      <copy todir="${util.dir}">
-        <fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
-      </copy>
-  	  
-  	  <mkdir dir="${ecogrid-dist-dir}"/>
-  	  <copy todir="${ecogrid-dist-dir}">
-  	        <fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
-  	  </copy>
 
-      <delete file="${ver.dir}/lib/utilities.jar"/>
+	<target name="distsrc" depends="dist"
+		description="prepares a source distribution">
+		<mkdir dir="${ver.src}" />
+		<copy todir="${ver.src}">
+			<fileset dir="./src" />
+		</copy>
+		<mkdir dir="${util.dir}" />
+		<copy todir="${util.dir}">
+			<fileset dir="${build.tmp}/utilities" excludes="**/CVS*" />
+		</copy>
 
-      <delete file="./${name}-src-${release}.zip"/>
-      <zip zipfile="./${name}-src-${release}.zip" 
-      	   basedir="${dist.dir}"
-      	   excludes="metacat*.tar.gz,metacat*.zip"/>
-      <delete file="./${name}-src-${release}.tar.gz" />
-      <tar tarfile="./${name}-src-${release}.tar" 
-      	   basedir="${dist.dir}"
-      	   excludes="metacat*.tar.gz,metacat*.zip"/>
-      <gzip zipfile="./${name}-src-${release}.tar.gz"
-                src="./${name}-src-${release}.tar"/>
-      <delete file="./${name}-src-${release}.tar" />
-      <!--delete dir="${dist.dir}"/ --> 
-  </target>
-	
-  <target name="deb-package" depends="distbin"
-  	  description="create a debian installation package">
-  	<delete dir="${deb.pkg.dir}"/>
-    <mkdir dir="${deb.pkg.dir}/DEBIAN"/>
-  	<copy todir="${deb.pkg.dir}/DEBIAN" filtering="yes">
-      <fileset dir="./src/scripts/debian"
-               includes="control postinst"/>
-    </copy>
-  	
-    <mkdir dir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"/>
-  	<copy todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"
-  		  filtering="yes">
-      <fileset dir="./src/scripts/debian"
-               excludes="control postinst" />
-    </copy>
-  	<chmod file="${deb.pkg.dir}/DEBIAN/postinst" 
-  	       perm="755"/>
-  	
-  	<copy file="${dist.dir}/knb.war" 
-  		  todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"/>
-  	<copy file="./metacat-bin-${metacat.version}.tar.gz" 
-  		  tofile="${deb.pkg.dir}/metacat_${metacat.version}.orig.tar.gz" />
-  	
-    <exec dir="${pkg.dir}" executable="dpkg" os="Linux, Unix" failonerror="true">
-      <arg line="--build debian" />   	
-    </exec>
-  	
-  	<move file="${pkg.dir}/debian.deb" 
-  		  tofile="${pkg.dir}/metacat_${metacat.version}${metacat.releaseCandidate}_all.deb"/>
-  </target>
+		<mkdir dir="${ecogrid-dist-dir}" />
+		<copy todir="${ecogrid-dist-dir}">
+			<fileset dir="${ecogrid-dir}" excludes="**/CVS*" />
+		</copy>
 
-   <target name="stylesheettest">
-     <xslt in="${input}" out="eml.html" style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
-      <param name="displaymodule" expression="${displaymodule}"/>
-      <param name="docid" expression="${input}"/>
-      <param name="entitytype" expression="${entitytype}"/>
-      <param name="entityindex" expression="${entityindex}"/>
-      <outputproperty name="method" value="html"/>
-      <outputproperty name="standalone" value="yes"/>
-      <outputproperty name="encoding" value="iso8859_1"/>
-      <outputproperty name="indent" value="yes"/>
-    </xslt>
-  </target>
+		<delete file="${ver.dir}/lib/utilities.jar" />
 
- 
-  <target name="compilewebclient" depends="prepare">
-     <javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" />
-  </target>
+		<delete file="./${name}-src-${release}.zip" />
+		<zip zipfile="./${name}-src-${release}.zip"
+			basedir="${dist.dir}" excludes="metacat*.tar.gz,metacat*.zip" />
+		<delete file="./${name}-src-${release}.tar.gz" />
+		<tar tarfile="./${name}-src-${release}.tar"
+			basedir="${dist.dir}" excludes="metacat*.tar.gz,metacat*.zip" />
+		<gzip zipfile="./${name}-src-${release}.tar.gz"
+			src="./${name}-src-${release}.tar" />
+		<delete file="./${name}-src-${release}.tar" />
+		<!--delete dir="${dist.dir}"/ -->
+	</target>
 
-  <target name="runwebclient" depends="compilewebclient">
-     <java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
-           dir="${build.dest}" fork="yes"
-           classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true">
-         <arg value="${serviceUrl}"/>
-         <arg value="${docid}"/>
-     </java>
-  </target>
-  
-  <target name="spatial_option" depends="prepare" description=" -- compiles code for the spatial option">
+	<target name="deb-package" depends="distbin"
+		description="create a debian installation package">
+		<delete dir="${deb.pkg.dir}" />
+		<mkdir dir="${deb.pkg.dir}/DEBIAN" />
+		<copy todir="${deb.pkg.dir}/DEBIAN" filtering="yes">
+			<fileset dir="./src/scripts/debian"
+				includes="control postinst" />
+		</copy>
 
-    <echo message="Compiling the metatcat shapefile creator"/>
-    <echo message="using the shapelib at: ${shapelib.dir}"/>
-    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
-     <arg line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
-    </exec>
-  
-    <exec dir="." executable="g++" os="Linux, Unix" failonerror="true">
-     <arg line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
-    </exec>
-  </target>
+		<mkdir
+			dir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}" />
+		<copy
+			todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}"
+			filtering="yes">
+			<fileset dir="./src/scripts/debian"
+				excludes="control postinst" />
+		</copy>
+		<chmod file="${deb.pkg.dir}/DEBIAN/postinst" perm="755" />
 
-    <!-- LSID Authority support -->
-    <patternset id="lsid.jars">
-        <include name="axis.jar" />
-        <include name="commons-discovery-0.2.jar" />
-        <include name="jaxrpc.jar" />
-        <include name="lsid-client-1.1.1.jar" />
-        <include name="lsid-server-1.1.1.jar" />
-        <include name="saaj.jar" />
-        <include name="wsdl4j-1.5.1.jar" />
-        <include name="activation.jar" />
-        <include name="castor-0.9.5.jar" />
-        <include name="dnsjava-1.3.2.jar" />
-        <include name="mail.jar" />
-        <include name="commons-logging-1.0.4.jar" />
-        <!-- These jars may be needed but seem to not actually be,
-             so leaving them out for now
-        <include name="axis-ant.jar" />
-        -->
-        <!--<include name="GenCastor.class" />-->
-    </patternset>
-    <patternset id="lib.jars">
-        <include name="httpclient.jar" />
-        <include name="log4j-1.2.12.jar" />
-        <include name="utilities.jar" />
-        <include name="xercesImpl.jar" />
-        <include name="xalan.jar" />
-        <include name="xml-apis.jar" />
-    </patternset>
+		<copy file="${dist.dir}/knb.war"
+			todir="${deb.pkg.dir}/usr/share/metacat-${metacat.version}" />
+		<copy file="./metacat-bin-${metacat.version}.tar.gz"
+			tofile="${deb.pkg.dir}/metacat_${metacat.version}.orig.tar.gz" />
 
-    <path id="lsid.classpath">
-        <fileset dir="${lsid.lib.dir}">
-            <patternset refid="lsid.jars"/>
-        </fileset>
-        <fileset dir="${lib.dir}">
-            <patternset refid="lsid.jars"/>
-        </fileset>
-        <fileset dir="${lib.dir}">
-            <include name="xalan.jar" />
-            <include name="xml-apis.jar" />
-        </fileset>
-        <fileset dir="${build.dir}">
-            <include name="metacat-client.jar" />
-        </fileset>
-    </path>
+		<exec dir="${pkg.dir}" executable="dpkg" os="Linux, Unix"
+			failonerror="true">
+			<arg line="--build debian" />
+		</exec>
 
-    <filterset id="configFilters">
-        <!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
-                value="${config.hostname}" / -->
-        <!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
-                value="${config.port}" / -->
-        <!-- MCD BYE filter token="METADATA_LABELS"
-                value="${config.metadataLabelLsid}" / -->
-        <!-- MCD BYE filter token="METACAT_SERVER"
-                value="${config.metacatserver}" / -->
-        <!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
-                value="${config.lsidauthority}" / -->
-    </filterset>
-    
-    <target name="prepare-lsid"
-            depends="prepare,utilities,clientjar"
-            description="Configure files prior to compilation">
-        <mkdir dir="${lsid.build.dir}" />
-        <!-- Copy the properties file into the build -->
-        <copy file="${conf.dir}/metacat-lsid.properties"
-              tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
-              overwrite="true">
-            <filterset refid="configFilters" />
-        </copy>
-        <copy file="${conf.dir}/log4j.properties"
-              tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
-              overwrite="true">
-            <filterset refid="configFilters" />
-        </copy>
-        <!-- Copy config files into the build -->
-        <copy todir="${lsid.build.dir}/WEB-INF">
-            <fileset dir="${webinf.dir}"
-                     includes="**/*.wsdd" />
-        </copy>
-        <!-- Copy the metadata configuration files into the build -->
-        <mkdir dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
-        <copy todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
-            <fileset dir="${conf.dir}"
-                     includes="**/*.xml" />
-            <fileset dir="${conf.dir}"
-                     includes="**/*.xslt" />
-            <filterset refid="configFilters" />
-        </copy>
-        <!-- Copy services files into the build -->
-        <mkdir dir="${lsid.build.dir}/services" />
-        <copy todir="${lsid.build.dir}/services">
-            <fileset dir="${services.dir}" />
-            <filterset refid="configFilters" />
-        </copy>
-        <!-- Copy axis files into the build -->
-        <mkdir dir="${lsid.build.dir}" />
-        <copy todir="${lsid.build.dir}">
-            <fileset dir="${conf.dir}/axis"
-                     excludes="*.properties"/>
-        </copy>
-        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
-        <copy todir="${lsid.build.dir}/WEB-INF/classes">
-            <fileset dir="${conf.dir}/axis"
-                     includes="*.properties"/>
-        </copy>
-    </target>
-    
-    <target name="compile-lsid"
-            depends="prepare-lsid"
-            description="Compile Java sources">
-        <mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
-        <javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
-               destdir="${lsid.build.dir}/WEB-INF/classes"
-               debug="${compile.debug}"
-               deprecation="${compile.deprecation}"
-               optimize="${compile.optimize}">
-            <classpath refid="lsid.classpath" />
-        </javac>
-    </target>
-    
-    <target name="war-lsid"
-            depends="compile-lsid"
-            description="Create a war file for the application">
-        <mkdir dir="${dist.dir}" />
-        <war destfile="${dist.dir}/${authority.context}.war"
-             webxml="${webinf.dir}/web.xml">
-            <fileset dir="${lsid.build.dir}" />
-            <lib dir="${lsid.lib.dir}">
-                <patternset refid="lsid.jars"/>
-            </lib>
-            <lib dir="${lib.dir}">
-                <patternset refid="lib.jars"/>
-            </lib>
-            <lib dir="${lib.dir}">
-                <include name="xalan.jar" />
-                <include name="xml-apis.jar" />
-            </lib>
-            <lib dir="${build.dir}">
-                <include name="metacat-client.jar" />
-            </lib>
-        </war>
-    </target>
-    
-    <target name="deploy-lsid"
-            depends="war-lsid"
-            description="Deploy LSID war to servlet container">
-        <delete dir="${app.deploy.dir}/${authority.context}" />
-        <delete file="${app.deploy.dir}/${authority.context}.war" />
-        <mkdir dir="${app.deploy.dir}" />
-        <copy todir="${app.deploy.dir}">
-            <fileset dir="${dist.dir}" />
-        </copy>
-    </target>
+		<move file="${pkg.dir}/debian.deb"
+			tofile="${pkg.dir}/metacat_${metacat.version}${metacat.releaseCandidate}_all.deb" />
+	</target>
+
+	<target name="stylesheettest">
+		<xslt in="${input}" out="eml.html"
+			style="${style-common-cvsrelpath}/eml-2.0.0/eml-2.0.0.xsl">
+			<param name="displaymodule" expression="${displaymodule}" />
+			<param name="docid" expression="${input}" />
+			<param name="entitytype" expression="${entitytype}" />
+			<param name="entityindex" expression="${entityindex}" />
+			<outputproperty name="method" value="html" />
+			<outputproperty name="standalone" value="yes" />
+			<outputproperty name="encoding" value="iso8859_1" />
+			<outputproperty name="indent" value="yes" />
+		</xslt>
+	</target>
+
+
+	<target name="compilewebclient" depends="prepare">
+		<javac srcdir="${build.src}" destdir="${build.dest}"
+			includes="**/application/*.java" classpathref="webservicepath" />
+	</target>
+
+	<target name="runwebclient" depends="compilewebclient">
+		<java
+			classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
+			dir="${build.dest}" fork="yes" classpathref="webservicepath"
+			classpath="./lib/utilities.jar" failonerror="true">
+			<arg value="${serviceUrl}" />
+			<arg value="${docid}" />
+		</java>
+	</target>
+
+	<target name="spatial_option" depends="prepare"
+		description=" -- compiles code for the spatial option">
+
+		<echo message="Compiling the metatcat shapefile creator" />
+		<echo message="using the shapelib at: ${shapelib.dir}" />
+		<exec dir="." executable="g++" os="Linux, Unix"
+			failonerror="true">
+			<arg
+				line="./src/spatial/cpp/metacat_shapefile.cpp -I ${shapelib.dir} -c -o build/metacat_shapefile.o" />
+		</exec>
+
+		<exec dir="." executable="g++" os="Linux, Unix"
+			failonerror="true">
+			<arg
+				line="build/metacat_shapefile.o ${shapelib.dir}/.libs/libshp.a -o bin/metacat_shapefile" />
+		</exec>
+	</target>
+
+	<!-- LSID Authority support -->
+	<patternset id="lsid.jars">
+		<include name="axis.jar" />
+		<include name="commons-discovery-0.2.jar" />
+		<include name="jaxrpc.jar" />
+		<include name="lsid-client-1.1.1.jar" />
+		<include name="lsid-server-1.1.1.jar" />
+		<include name="saaj.jar" />
+		<include name="wsdl4j-1.5.1.jar" />
+		<include name="activation.jar" />
+		<include name="castor-0.9.5.jar" />
+		<include name="dnsjava-1.3.2.jar" />
+		<include name="mail.jar" />
+		<include name="commons-logging-1.0.4.jar" />
+		<!-- These jars may be needed but seem to not actually be,
+			so leaving them out for now
+			<include name="axis-ant.jar" />
+		-->
+		<!--<include name="GenCastor.class" />-->
+	</patternset>
+	<patternset id="lib.jars">
+		<include name="httpclient.jar" />
+		<include name="log4j-1.2.12.jar" />
+		<include name="utilities.jar" />
+		<include name="xercesImpl.jar" />
+		<include name="xalan.jar" />
+		<include name="xml-apis.jar" />
+	</patternset>
+
+	<path id="lsid.classpath">
+		<fileset dir="${lsid.lib.dir}">
+			<patternset refid="lsid.jars" />
+		</fileset>
+		<fileset dir="${lib.dir}">
+			<patternset refid="lsid.jars" />
+		</fileset>
+		<fileset dir="${lib.dir}">
+			<include name="xalan.jar" />
+			<include name="xml-apis.jar" />
+		</fileset>
+		<fileset dir="${build.dir}">
+			<include name="metacat-client.jar" />
+		</fileset>
+	</path>
+
+	<filterset id="configFilters">
+		<!-- MCD BYE filter token="LSID_AUTHORITY_HOSTNAME"
+			value="${config.hostname}" / -->
+		<!-- MCD BYE filter token="LSID_AUTHORITY_PORT"
+			value="${config.port}" / -->
+		<!-- MCD BYE filter token="METADATA_LABELS"
+			value="${config.metadataLabelLsid}" / -->
+		<!-- MCD BYE filter token="METACAT_SERVER"
+			value="${config.metacatserver}" / -->
+		<!-- MCD BYE filter token="LSID_AUTHORITY_STRING"
+			value="${config.lsidauthority}" / -->
+	</filterset>
+
+	<target name="prepare-lsid" depends="prepare,utilities,clientjar"
+		description="Configure files prior to compilation">
+		<mkdir dir="${lsid.build.dir}" />
+		<!-- Copy the properties file into the build -->
+		<copy file="${conf.dir}/metacat-lsid.properties"
+			tofile="${lsid.build.dir}/WEB-INF/classes/metacat-lsid.properties"
+			overwrite="true">
+			<filterset refid="configFilters" />
+		</copy>
+		<copy file="${conf.dir}/log4j.properties"
+			tofile="${lsid.build.dir}/WEB-INF/classes/log4j.properties"
+			overwrite="true">
+			<filterset refid="configFilters" />
+		</copy>
+		<!-- Copy config files into the build -->
+		<copy todir="${lsid.build.dir}/WEB-INF">
+			<fileset dir="${webinf.dir}" includes="**/*.wsdd" />
+		</copy>
+		<!-- Copy the metadata configuration files into the build -->
+		<mkdir
+			dir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}" />
+		<copy
+			todir="${lsid.build.dir}/WEB-INF/classes/${lsid.classes.dir}">
+			<fileset dir="${conf.dir}" includes="**/*.xml" />
+			<fileset dir="${conf.dir}" includes="**/*.xslt" />
+			<filterset refid="configFilters" />
+		</copy>
+		<!-- Copy services files into the build -->
+		<mkdir dir="${lsid.build.dir}/services" />
+		<copy todir="${lsid.build.dir}/services">
+			<fileset dir="${services.dir}" />
+			<filterset refid="configFilters" />
+		</copy>
+		<!-- Copy axis files into the build -->
+		<mkdir dir="${lsid.build.dir}" />
+		<copy todir="${lsid.build.dir}">
+			<fileset dir="${conf.dir}/axis" excludes="*.properties" />
+		</copy>
+		<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
+		<copy todir="${lsid.build.dir}/WEB-INF/classes">
+			<fileset dir="${conf.dir}/axis" includes="*.properties" />
+		</copy>
+	</target>
+
+	<target name="compile-lsid" depends="prepare-lsid"
+		description="Compile Java sources">
+		<mkdir dir="${lsid.build.dir}/WEB-INF/classes" />
+		<javac srcdir="src/edu/ucsb/nceas/metacat/lsid"
+			destdir="${lsid.build.dir}/WEB-INF/classes" debug="${compile.debug}"
+			deprecation="${compile.deprecation}"
+			optimize="${compile.optimize}">
+			<classpath refid="lsid.classpath" />
+		</javac>
+	</target>
+
+	<target name="war-lsid" depends="compile-lsid"
+		description="Create a war file for the application">
+		<mkdir dir="${dist.dir}" />
+		<war destfile="${dist.dir}/${authority.context}.war"
+			webxml="${webinf.dir}/web.xml">
+			<fileset dir="${lsid.build.dir}" />
+			<lib dir="${lsid.lib.dir}">
+				<patternset refid="lsid.jars" />
+			</lib>
+			<lib dir="${lib.dir}">
+				<patternset refid="lib.jars" />
+			</lib>
+			<lib dir="${lib.dir}">
+				<include name="xalan.jar" />
+				<include name="xml-apis.jar" />
+			</lib>
+			<lib dir="${build.dir}">
+				<include name="metacat-client.jar" />
+			</lib>
+		</war>
+	</target>
+
+	<target name="deploy-lsid" depends="war-lsid"
+		description="Deploy LSID war to servlet container">
+		<delete dir="${app.deploy.dir}/${authority.context}" />
+		<delete file="${app.deploy.dir}/${authority.context}.war" />
+		<mkdir dir="${app.deploy.dir}" />
+		<copy todir="${app.deploy.dir}">
+			<fileset dir="${dist.dir}" />
+		</copy>
+	</target>
 </project>
