<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2016, WSO2 Inc. (http://wso2.com) All Rights Reserved.
  ~
  ~ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>org.wso2.appcloud</groupId>
        <artifactId>appcloud-parent</artifactId>
        <version>3.0.0-SNAPSHOT</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.appcloud.provisioning.runtime</artifactId>
    <packaging>bundle</packaging>
    <name>WSO2 AppCloud Components - Runtime provisioning</name>
    <description>org.wso2.appcloud.provisioning.runtime</description>

    <dependencies>
        <dependency>
            <groupId>org.wso2.appcloud</groupId>
            <artifactId>org.wso2.appcloud.common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.logging</artifactId>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-client</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>
                            ${project.artifactId}
                        </Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            !org.wso2.appcloud.provisioning.runtime.internal,
                            org.wso2.appcloud.provisioning.runtime.*,
                        </Export-Package>
                        <Private-Package>
                            org.wso2.appcloud.provisioning.runtime.internal,
                        </Private-Package>
                        <Import-Package>
                            io.fabric8.kubernetes.*;version="[1.3.0, 3.0.0)",
                            org.apache.commons.logging.*,
                            org.osgi.framework.*,
                            org.slf4j.*;version="1.6.1",
                            org.wso2.appcloud.common.*,
                            *;resolution:=optional,<!-- There are some packages/dependencies are not required for the bundle to resolve -->
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <!--<version>2.1.7</version>-->
                <inherited>true</inherited>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCount>1</threadCount>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <!--<forkMode>pertest</forkMode>-->
                    <!--<argLine>-enableassertions</argLine>-->
                    <!--<skip>true</skip>-->
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
