<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    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 xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>io.gravitee.kubernetes</groupId>
        <artifactId>gravitee-kubernetes</artifactId>
        <version>0.2.2</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <groupId>io.gravitee.gateway.services</groupId>
    <artifactId>gravitee-kubernetes-controller</artifactId>
    <name>Gravitee.io APIM - Kubernetes - Controller</name>

    <dependencies>
        <!-- Gravitee.io dependencies -->
        <dependency>
            <groupId>io.gravitee.gateway.handlers</groupId>
            <artifactId>gravitee-gateway-handlers-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.gravitee.gateway</groupId>
            <artifactId>gravitee-gateway-reactor</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.gravitee.common</groupId>
            <artifactId>gravitee-common</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- rxjava dependencies provided by VertX through gateway-standalone-container -->
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.fabric8/kubernetes-client -->
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-client</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>kubernetes-model-autoscaling</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-batch</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-coordination</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-networking</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-policy</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-scheduling</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-settings</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>kubernetes-model-storageclass</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>openshift-model</artifactId>
                    <groupId>io.fabric8</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-core</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jackson-databind</artifactId>
                    <groupId>com.fasterxml.jackson.core</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jaxb-api</artifactId>
                    <groupId>javax.xml.bind</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Dependencies for tests -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-server-mock</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>src/main/assembly/plugin-assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-plugin-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- Skip test for the moment, execution order make tests fail (OK using IDEA) -->
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>