<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. 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 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>
        <artifactId>device-mgt</artifactId>
        <groupId>io.entgra.device.mgt.core</groupId>
        <version>5.0.26-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>io.entgra.device.mgt.core.device.mgt.extensions</artifactId>
    <packaging>bundle</packaging>
    <name>WSO2 Carbon - Device Management Extensions</name>
    <description>WSO2 Carbon - Device Management Extensions</description>
    <url>http://wso2.org</url>

    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon.governance</groupId>
            <artifactId>org.wso2.carbon.governance.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.entgra.device.mgt.core</groupId>
            <artifactId>io.entgra.device.mgt.core.device.mgt.common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.entgra.device.mgt.core</groupId>
            <artifactId>io.entgra.device.mgt.core.device.mgt.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom.wso2</groupId>
            <artifactId>axiom</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.utils</artifactId>
        </dependency>
		<dependency>
			<groupId>org.wso2.carbon</groupId>
			<artifactId>org.wso2.carbon.ndatasource.core</artifactId>
		</dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.entgra.device.mgt.core</groupId>
            <artifactId>io.entgra.device.mgt.core.device.mgt.extensions.pull.notification</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.entgra.device.mgt.core</groupId>
            <artifactId>io.entgra.device.mgt.core.application.mgt.common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database.wso2</groupId>
            <artifactId>h2-database-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-dbcp.wso2</groupId>
            <artifactId>commons-dbcp</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-pool.wso2</groupId>
            <artifactId>commons-pool</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.governance</groupId>
            <artifactId>org.wso2.carbon.governance.registry.extensions</artifactId>
            <scope>test</scope>
            <exclusions>
            <exclusion>
                <groupId>jaxen</groupId>
                <artifactId>jaxen</artifactId>
            </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.registry</groupId>
            <artifactId>org.wso2.carbon.registry.indexing</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.testing.osgi-mock</artifactId>
            <scope>test</scope>
        </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>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Bundle-Version>${io.entgra.device.mgt.core.version}</Bundle-Version>
                        <Bundle-Description>Device Management Extensions Bundle</Bundle-Description>
                        <Export-Package>
							!io.entgra.device.mgt.core.device.mgt.extensions.internal,
                            io.entgra.device.mgt.core.device.mgt.extensions.*
                        </Export-Package>
                        <Import-Package>
                            org.wso2.carbon.governance.api.*,
                            javax.xml.namespace;resolution:=optional,
                            org.wso2.carbon.context,
                            io.entgra.device.mgt.core.device.mgt.common.*,
                            org.wso2.carbon.registry.api,
                            org.wso2.carbon.registry.core,
                            org.wso2.carbon.registry.core.exceptions,
                            org.wso2.carbon.registry.core.session,
                            org.wso2.carbon.base,
							javax.xml.bind,
							org.apache.commons.logging,
							org.wso2.carbon.utils,
							javax.naming,
							javax.sql,
							javax.xml,
							javax.xml.bind.annotation,
                            javax.xml.stream,
							javax.xml.parsers;resolution:=optional,
							org.apache.commons.lang,
                            org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
                            org.osgi.service.*;version="${imp.package.version.osgi.service}",
							org.w3c.dom,
							org.wso2.carbon.ndatasource.core,
							org.wso2.carbon.registry.core.service,
							org.wso2.carbon.utils.dbcreator,
							org.wso2.carbon.utils.multitenancy,
                            io.entgra.device.mgt.core.device.mgt.core.service,
                            com.google.gson
                        </Import-Package>
						<DynamicImport-Package>io.entgra.device.mgt.core.device.mgt.extensions.pull.notification,
							io.entgra.device.mgt.core.device.mgt.extensions.pull.notification.*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
                            <outputDirectory>${basedir}/target/coverage-reports/site</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
    
</project>