<?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="zookeepercontrib" default="compile" basedir=".">

  <property name="contribfilesetincludes" value="*/build.xml" />
  <property name="contribfilesetexcludes" value="" />

  <fileset id="contribfileset" dir=".">
    <include name="${contribfilesetincludes}"/>
    <exclude name="${contribfilesetexcludes}"/>
  </fileset>

  <!-- In case one of the contrib subdirectories -->
  <!-- fails the build or test targets and you cannot fix it: -->
  <!-- Then add to fileset: excludes="badcontrib/build.xml" -->

  <!-- ====================================================== -->
  <!-- Compile contribs.                                      -->
  <!-- ====================================================== -->
  <target name="compile">
    <subant target="jar">
      <fileset refid="contribfileset" />
    </subant>
  </target>
  
  <!-- ====================================================== -->
  <!-- Package contrib jars.                                  -->
  <!-- ====================================================== -->
  <target name="package">
    <subant target="package">
      <fileset refid="contribfileset" />
    </subant>
  </target>

  <!-- ====================================================== -->
  <!-- Test all the contribs.                               -->
  <!-- ====================================================== -->
  <target name="test">
    <subant target="test">
      <fileset refid="contribfileset" />
    </subant>
  </target>
  
  
  <!-- ====================================================== -->
  <!-- Clean all the contribs.                              -->
  <!-- ====================================================== -->
  <target name="clean">
    <subant target="clean">
      <fileset refid="contribfileset" />
    </subant>
  </target>

  <!-- ====================================================== -->
  <!-- rpm all the contribs.                                  -->
  <!-- ====================================================== -->
  <target name="rpm">
    <subant target="rpm">
      <fileset refid="contribfileset" />
    </subant>
  </target>

  <!-- ====================================================== -->
  <!-- deb all the contribs.                                  -->
  <!-- ====================================================== -->
  <target name="deb">
    <subant target="deb">
      <fileset refid="contribfileset" />
    </subant>
  </target>
</project>
