<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2012, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<project name="module-repository" basedir="." default="modules">

    <import file="lib.xml"/>

    <property name="output.dir" value="target"/>


    <target name="modules">
        <echo message="******** ${project.version} ********"/>
        <!--
          ~ Complete list of modules to assemble.
          ~
          ~ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
          ~ +++++++   KEEP THIS LIST ALPHABETICAL BY MODULE NAME!   +++++++
          ~ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
          -->

        <module-def name="org.jboss.resteasy.resteasy-atom-provider">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-atom-provider"  jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-cdi">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-cdi"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-jackson-provider">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-jackson-provider" jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-jaxb-provider">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-jaxb-provider" jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-jettison-provider">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-jettison-provider" jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-jaxrs">
            <maven-resource group="org.jboss.resteasy" artifact="async-http-servlet-3.0"/>
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-jaxrs" jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-jsapi">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-jsapi" jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-multipart-provider">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-multipart-provider" jandex="true"/>
        </module-def>

        <module-def name="org.jboss.resteasy.resteasy-yaml-provider">
            <maven-resource group="org.jboss.resteasy" artifact="resteasy-yaml-provider" jandex="true"/>
        </module-def>

        <zip destfile="${output.dir}/resteasy-jboss-modules-${project.version}.zip">
            <zipfileset dir="${output.dir}/modules"/>
        </zip>
    </target>

    <target name="clean-target">
        <delete dir="${output.dir}"/>
    </target>

    <target name="clean" depends="clean-target">
        <delete file="maven-ant-tasks.jar"/>
    </target>

</project>
