<!--
  ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  ~ and other contributors as indicated by the @author tags.
  ~
  ~ 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="module-repository" basedir="." default="all">

    <import file="lib.xml"/>

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

    <target name="all">
        <antcall target="modules">
            <param name="mavenized.modules" value="false"/>
            <param name="output.dir" value="target"/>
        </antcall>
    </target>


    <target name="modules">

        <!-- server min dependencies -->

        <module-def name="org.keycloak.keycloak-common">
            <maven-resource group="org.keycloak" artifact="keycloak-common"/>
        </module-def>

        <!-- subsystems -->

        <module-def name="org.keycloak.keycloak-adapter-spi">
            <maven-resource group="org.keycloak" artifact="keycloak-adapter-spi"/>
            <maven-resource group="org.keycloak" artifact="keycloak-undertow-adapter-spi"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-core">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-core"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-core-public">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-core-public"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-adapter-api-public">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-adapter-api-public"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-adapter-core">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-adapter-core"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-jboss-adapter-core">
            <maven-resource group="org.keycloak" artifact="keycloak-jboss-adapter-core"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-undertow-adapter">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-undertow-adapter"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-wildfly-adapter">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-wildfly-adapter"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-wildfly-subsystem">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-wildfly-subsystem"/>
        </module-def>

        <module-def name="org.keycloak.keycloak-saml-wildfly-elytron-adapter">
            <maven-resource group="org.keycloak" artifact="keycloak-saml-wildfly-elytron-adapter"/>
        </module-def>

    </target>

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

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

</project>
