<?xml version="1.0"?>

<project default="help" basedir=".">

  <target name="help">
    <echo message="Edit build.properties file to configure local settings"/>
    <echo message=""/>
    <echo message="Current settings for critical properties from build.properties:"/>
    <echo message="---------------------------------------------------------------"/>
    <echo message="tomcat.root = ${tomcat.root}"/>
    <echo message="target      = ${target}"/> 
    <echo message=""/>
    <echo message="Targets:"/>
    <echo message="---------------------------------------------------------------"/>
    <echo message="clean           -- removes all collateral"/>
    <echo message="serverJar       -- build the Service jar file for the server specified by property 'target'"/>
    <echo message="stubJar         -- build the Stub jar file for the QueryService."/>
    <echo message="war             -- build a war file for direct deployment in tomcat"/>
    <echo message="-Dargs='args' test -- execute the QueryServiceClient with the specified arguments"/>
  </target>

  <!-- This property file must define ogsa.root -->
  <property file="build.properties"/>

  <!-- default the debug property to false unless set in build.properties -->
  <condition property="debug" value="false">
    <not><isset property="debug"/></not>
  </condition>

  <!-- default the deprecation property to false unless set in build.properties -->
  <condition property="deprecation" value="true">
    <not><isset property="deprecation"/></not>
  </condition>

  <!-- default the includesource property to false unless set in build.properties -->
  <condition property="client.files.jarall" value="set">
    <istrue value="${includesource}"/>
  </condition>

  <!-- Preset the requiredjars path to nothing.  Override it in the service
       specific setProperties target -->
  <patternset id="requiredjars">
      <exclude name="**"/>
  </patternset>

  <!-- based on the setting of target in build.properties,
       determine which service to build -->
  <import file="buildfiles/${target}.xml"/>

</project>