<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you 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="demo_common" default="build" basedir=".">

    <property name="demos.current.dir" value="."/>
    <property name="common.build.classes" value="${basedir}/build/classes"/>
    <property name="common.build.src" value="${basedir}/src"/>
    <property environment="env"/>
    <property name="cxf.home" value="${env.CXF_HOME}"/>

    <path id="build.classpath">
        <path location="${common.build.classes}"/>
        <path location="${cxf.home}/lib/geronimo-servlet_2.5_spec-1.1-M1.jar"/>
    </path>

    <target name="init">
        <mkdir dir="${common.build.classes}"/>
    </target>

    <target name="compile" depends="init">
        <javac destdir="${common.build.classes}" >
            <src path="${common.build.src}"/>
            <include name="**/*.java"/>
            <classpath>
                <path refid="build.classpath"/>
            </classpath>
        </javac>
    </target>

    <target name="build" depends="clean,compile">
        <jar destfile="${basedir}/common.jar">
            <fileset dir="${common.build.classes}"/>
        </jar>
    </target>

    <target name="clean">
        <delete dir="${basedir}/build"/>
        <delete file="${basedir}/common.jar"/>
    </target>

</project>
