<!--
 * 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.

-->
<project name="XS" default="all">
    <import file="api.xml"/>
 
    <property name="build.xs" location="${build}/xs"/>
    <property name="build.xs.classes" location="${build.xs}/classes"/>
    <property name="build.xs.reports" location="${build.xs}/reports"/>
    <property name="src.xs" location="${basedir}/src/xs"/>

    <path id="xs.class.path">
        <pathelement location="${preqs}/xml-apis-1.3.02.jar"/>
        <pathelement location="${preqs}/junit.jar"/>
        <pathelement location="${dist}/jaxmeapi-${version}.jar"/>
    </path>

    <target name="XS.clean">
        <delete dir="${build.xs}"/>
    </target>
   
    <target name="XS.compile" depends="API.all">
        <jc srcdir="${src.xs}" destdir="${build.xs.classes}"
            classpathref="xs.class.path" excludes="" java14classes=""/>
    </target>

    <target name="XS.jar" depends="XS.compile">
        <jarzip filename="jaxmexs" classesdir="${build.xs.classes}"
            srcdir="${src.xs}"/>
    </target>

    <target name="all" depends="XS.jar"/>

    <target name="test" depends="XS.jar">
        <path id="xs.test.path">
            <path refid="xs.class.path"/>
            <pathelement location="${dist}/jaxmexs-${version}.jar"/>
            <pathelement location="${preqs}/xercesImpl.jar"/>
        </path>
        <runtests reportsdir="${build.xs.reports}" classpathref="xs.test.path">
            <tests>
                <fileset dir="${src.xs}"
                    includes="org/apache/ws/jaxme/xs/junit/**/*Test.java"
                    excludes="org/apache/ws/jaxme/xs/junit/WSDLTest.java"/>
            </tests>
        </runtests>
    </target>
</project>
