2004-03-20 05:11:51 +00:00

168 lines
5.6 KiB
XML

<?xml version="1.0"?>
<!--
Copyright 2002-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Build file for resolver tests. No dependencies.
@author Norman.Walsh@Sun.COM
-->
<project name="xml-commons-resolver-tests" default="all" >
<!-- Location of where to put our build output -->
<property name="tmp.dir" value="."/>
<!-- Build directories -->
<property name="build.dir" value="${tmp.dir}/build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<!-- Source constants and directories -->
<property name="src.dir" value="src" />
<property name="resolver.jar.location" value="../../build" />
<property name="resolver.jar.name" value="resolver.jar" />
<property name="resolver.jar" value="${resolver.jar.location}/${resolver.jar.name}" />
<!--
<property name="jaxp.jar" value="/usr/local/jaxp-1.2_01/jaxp-api.jar"/>
-->
<property name="jaxp.jar" value="/usr/local/cvs/cocoon-2.1/tools/jalopy/lib/jaxp-1.2.jar"/>
<!--
<property name="xml-apis.jar" value="/usr/local/java/jakarta-ant-1.5.1/lib/xml-apis.jar"/>
-->
<property name="xml-apis.jar" value="/usr/local/cvs/cocoon-2.1/lib/endorsed/xml-apis.jar"/>
<!--
<property name="xercesImpl.jar" value="/usr/local/java/jakarta-ant-1.5.1/lib/xercesImpl.jar"/>
-->
<property name="xercesImpl.jar" value="/usr/local/cvs/cocoon-2.1/lib/endorsed/xercesImpl-2.6.0.jar"/>
<!-- Test results directory -->
<property name="check.dir" value="${tmp.dir}/${project.name}/check"/>
<!-- Build properties -->
<property name="build.debug" value="on"/>
<property name="build.deprecation" value="on"/>
<property name="build.optimize" value="off"/>
<!-- Document constants -->
<property name="company.name" value="Apache"/>
<property name="copyright.date" value="2002"/>
<property name="copyright.message"
value="Copyright &#169; ${copyright.date} ${company.name}. All Rights Reserved."/>
<!-- Public Targets -->
<target name="main"
depends="all"
description="Alias for all."/>
<target name="all"
depends="compile"
description="This is the default target. Compiles the program.">
</target>
<target name="compile" depends="init"
description="Compile all classes">
<echo message="Compiling..." />
<javac srcdir="${src.dir}" destdir="${build.classes.dir}">
<classpath>
<pathelement location="${jaxp.jar}"/>
<pathelement location="${xmlParserAPIs.jar}"/>
<pathelement location="${xerces2.jar}"/>
<pathelement location="${resolver.jar}"/>
<pathelement path="${java.class.path}"/>
</classpath>
<include name="*.java"/>
</javac>
</target>
<target name="catalogs.jar"
description="Jar catalog files and DTDs">
<echo message="Jarring catalogs and DTDs" />
<copy todir="${build.classes.dir}/catalogs">
<fileset dir="catalogs" includes="*.sub1"/>
<fileset dir="catalogs" includes="*.sub2"/>
<fileset dir="catalogs" includes="*.xml"/>
<fileset dir="catalogs" includes="*.catalog"/>
</copy>
<copy todir="${build.classes.dir}/dtds">
<fileset dir="dtds" includes="*.dtd"/>
<fileset dir="dtds" includes="*.mod"/>
</copy>
<jar jarfile="${build.dir}/catalogs.jar" basedir="${build.classes.dir}" />
</target>
<target name="clean"
description="Deletes all files that are generated by the build.">
<delete dir="${build.dir}"/>
</target>
<!-- Internal Targets -->
<target name="init">
<echo message="Building tests: Buildfile: $Revision$"/>
<mkdir dir="${build.classes.dir}" />
<mkdir dir="${build.dir}/catalogs" />
<mkdir dir="${build.dir}/dtds" />
</target>
<!-- Project specific Targets -->
<path id="tests-class-path">
<pathelement location="${xml-apis.jar}"/>
<pathelement location="${xercesImpl.jar}"/>
<pathelement location="${resolver.jar}"/>
<pathelement location="${build.classes.dir}"/>
</path>
<target name="statictest" depends="compile">
<java classname="StaticTest" fork="true">
<classpath refid="tests-class-path"/>
<arg value="-c"/>
<arg file="catalogs/main.catalog"/>
<arg file="test1.xml"/>
</java>
</target>
<target name="dynamictest" depends="compile">
<java classname="DynamicTest" fork="true">
<classpath refid="tests-class-path"/>
<arg value="-c"/>
<arg file="catalogs/main.catalog"/>
<arg file="test1.xml"/>
</java>
</target>
<target name="extendedtest" depends="compile">
<java classname="ExtendedTest" fork="true">
<classpath refid="tests-class-path"/>
<arg value="-c"/>
<arg file="catalogs/extended.xml"/>
<arg file="test2.xml"/>
</java>
</target>
<target name="jartest" depends="compile,catalogs.jar">
<java classname="JarTest" fork="true">
<classpath refid="tests-class-path"/>
<classpath>
<pathelement location="${build.dir}/catalogs.jar"/>
</classpath>
<arg value="-c"/>
<arg value="jar:file:${build.dir}/catalogs.jar!/catalogs/jarcatalog.xml"/>
<arg file="test3.xml"/>
</java>
</target>
</project>