<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2017, 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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.wso2.carbon.devicemgt</groupId>
    <artifactId>carbon-devicemgt</artifactId>
    <packaging>pom</packaging>
    <version>4.0.2</version>
    <name>WSO2 Carbon - Device Management - Parent</name>
    <url>http://wso2.org</url>
    <description>WSO2 Connected Device Manager Components</description>

    <parent>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>5</version>
    </parent>

    <modules>
        <module>components/device-mgt</module>
        <module>features/device-mgt</module>
    </modules>

    <pluginRepositories>
        <pluginRepository>
            <id>wso2-maven2-repository-1</id>
            <url>http://dist.wso2.org/maven2</url>
        </pluginRepository>
        <pluginRepository>
            <id>wso2-maven2-repository-2</id>
            <url>http://dist.wso2.org/snapshots/maven2</url>
        </pluginRepository>
        <pluginRepository>
            <id>wso2-maven2-repository-3</id>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
        </pluginRepository>
    </pluginRepositories>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${io.swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${com.fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${com.fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.msf4j</groupId>
                <artifactId>msf4j-all</artifactId>
                <version>${org.wso2.msf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.msf4j</groupId>
                <artifactId>msf4j-core</artifactId>
                <version>${org.wso2.msf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${servlet-api-version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>${com.fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <scope>test</scope>
                <version>${testng.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${com.fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>javax.ws.rs-api</artifactId>
                <version>${javax.ws.rs-api.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-json-provider</artifactId>
                <version>${com.fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.jaxrs</groupId>
                <artifactId>jackson-jaxrs-base</artifactId>
                <version>${com.fasterxml.jackson.core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>

            <!--OSGI dependencies-->

            <dependency>
                <groupId>org.wso2.eclipse.osgi</groupId>
                <artifactId>org.eclipse.osgi</artifactId>
                <version>${equinox.osgi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.eclipse.osgi</groupId>
                <artifactId>org.eclipse.osgi.services</artifactId>
                <version>${equinox.osgi.services.version}</version>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>${org.osgi.core.version}</version>
            </dependency>


            <!--Device mgt -->
            <dependency>
                <groupId>org.wso2.carbon.devicemgt</groupId>
                <artifactId>org.wso2.carbon.device.mgt.core.api</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <scm>
        <url>https://github.com/wso2/carbon-device-mgt.git</url>
        <developerConnection>scm:git:https://github.com/wso2/carbon-device-mgt.git</developerConnection>
        <connection>scm:git:https://github.com/wso2/carbon-device-mgt.git</connection>
        <tag>v4.0.2</tag>
    </scm>


    <repositories>
        <!-- Before adding ANYTHING in here, please start a discussion on the dev list.
             Ideally the Axis2 build should only use Maven central (which is available
             by default) and nothing else. We had troubles with other repositories in
             the past. Therefore configuring additional repositories here should be
             considered very carefully. -->
        <repository>
            <id>wso2-nexus</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>
        <repository>
            <id>wso2.releases</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>
        <repository>
            <id>wso2.snapshots</id>
            <name>WSO2 Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.wso2.carbon.maven</groupId>
                    <artifactId>carbon-feature-plugin</artifactId>
                    <version>${carbon.feature.plugin.version}</version>
                </plugin>
                <plugin><!-- Overridden from parent pom to exclude generated sources -->
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <configuration>
                        <effort>Max</effort>
                        <threshold>Low</threshold>
                        <xmlOutput>true</xmlOutput>
                        <findbugsXmlOutputDirectory>${project.build.directory}/findbugs
                        </findbugsXmlOutputDirectory>
                        <!--<excludeFilterFile>findbugs_exclude.xml</excludeFilterFile>-->
                        <!--Exclude generated sources-->
                    </configuration>
                    <version>${maven.findbugsplugin.version}</version>
                    <executions>
                        <execution>
                            <id>analyze-compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin><!-- Overridden from parent pom to exclude generated sources -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>validate</id>
                            <phase>validate</phase>
                            <configuration>
                                <configLocation>
                                    https://raw.githubusercontent.com/wso2/code-quality-tools/master/checkstyle/checkstyle.xml
                                </configLocation>
                                <suppressionsLocation>
                                    https://raw.githubusercontent.com/wso2/code-quality-tools/master/checkstyle/suppressions.xml
                                </suppressionsLocation>
                                <encoding>UTF-8</encoding>
                                <consoleOutput>true</consoleOutput>
                                <failsOnError>true</failsOnError>
                                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                                <!--Exclude generated sources-->
                                <excludes>**/generated/**/*</excludes>
                            </configuration>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- ANTLR Plugin -->
                <plugin>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr4-maven-plugin</artifactId>
                    <version>4.5.1</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>antlr4</goal>
                            </goals>
                            <configuration>
                                <listener>true</listener>
                                <visitor>false</visitor>
                                <encoding>${file.encoding}</encoding>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!--<plugin>-->
                    <!--<groupId>org.jacoco</groupId>-->
                    <!--<artifactId>jacoco-maven-plugin</artifactId>-->
                    <!--<version>${jacoco.version}</version>-->
                    <!--<executions>-->
                        <!--<execution>-->
                            <!--<id>pre-unit-test</id>-->
                            <!--<goals>-->
                                <!--<goal>prepare-agent</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<destFile>${basedir}/target/coverage-reports/jacoco-ut.exec</destFile>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                        <!--<execution>-->
                            <!--<id>pre-integration-test</id>-->
                            <!--<goals>-->
                                <!--<goal>prepare-agent-integration</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<destFile>${basedir}/target/coverage-reports/jacoco-it.exec</destFile>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                        <!--<execution>-->
                            <!--<id>post-integration-test</id>-->
                            <!--<phase>post-integration-test</phase>-->
                            <!--<goals>-->
                                <!--<goal>report</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<dataFile>${basedir}/target/coverage-reports/jacoco-it.exec</dataFile>-->
                                <!--<outputDirectory>${basedir}/target/coverage-reports/site/jacoco-it</outputDirectory>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                        <!--<execution>-->
                            <!--<id>post-unit-test</id>-->
                            <!--<phase>prepare-package</phase>-->
                            <!--<goals>-->
                                <!--<goal>report</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<dataFile>${basedir}/target/coverage-reports/jacoco-ut.exec</dataFile>-->
                                <!--<outputDirectory>${basedir}/target/coverage-reports/site/jacoco-ut</outputDirectory>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                        <!--<execution>-->
                            <!--<id>merge-results</id>-->
                            <!--<phase>verify</phase>-->
                            <!--<goals>-->
                                <!--<goal>merge</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<fileSets>-->
                                    <!--<fileSet>-->
                                        <!--<directory>${basedir}/target/coverage-reports</directory>-->
                                        <!--<includes>-->
                                            <!--<include>*.exec</include>-->
                                        <!--</includes>-->
                                    <!--</fileSet>-->
                                <!--</fileSets>-->
                                <!--<destFile>${basedir}/target/coverage-reports/aggregate.exec</destFile>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                        <!--<execution>-->
                            <!--<id>post-merge-report</id>-->
                            <!--<phase>verify</phase>-->
                            <!--<goals>-->
                                <!--<goal>report</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<dataFile>${basedir}/target/coverage-reports/aggregate.exec</dataFile>-->
                                <!--<outputDirectory>${basedir}/target/coverage-reports/site/jacoco-aggregate-->
                                <!--</outputDirectory>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                        <!--<execution>-->
                            <!--<id>default-check</id>-->
                            <!--<goals>-->
                                <!--<goal>check</goal>-->
                            <!--</goals>-->
                            <!--<configuration>-->
                                <!--<dataFile>${basedir}/target/coverage-reports/aggregate.exec</dataFile>-->
                                <!--<rules>-->
                                    <!--<rule>-->
                                        <!--<element>BUNDLE</element>-->
                                        <!--<limits>-->
                                            <!--<limit>-->
                                                <!--<counter>INSTRUCTION</counter>-->
                                                <!--<value>COVEREDRATIO</value>-->
                                                <!--<minimum>0.20</minimum>-->
                                            <!--</limit>-->
                                        <!--</limits>-->
                                    <!--</rule>-->
                                <!--</rules>-->
                            <!--</configuration>-->
                        <!--</execution>-->
                    <!--</executions>-->
                <!--</plugin>-->
                <!--<plugin>-->
                    <!--<groupId>org.apache.maven.plugins</groupId>-->
                    <!--<artifactId>maven-surefire-plugin</artifactId>-->
                    <!--<version>${maven.surefire.plugin.version}</version>-->
                    <!--<configuration>-->
                        <!--<systemPropertyVariables>-->
                            <!--<jacoco-agent.destfile>${basedir}/target/coverage-reports/jacoco-ut.exec-->
                            <!--</jacoco-agent.destfile>-->
                        <!--</systemPropertyVariables>-->
                    <!--</configuration>-->
                <!--</plugin>-->
                <!--<plugin>-->
                    <!--<groupId>org.apache.maven.plugins</groupId>-->
                    <!--<artifactId>maven-failsafe-plugin</artifactId>-->
                    <!--<version>2.19.1</version>-->
                    <!--<configuration>-->
                        <!--<systemPropertyVariables>-->
                            <!--<jacoco-agent.destfile>${basedir}/target/coverage-reports/jacoco-it.exec-->
                            <!--</jacoco-agent.destfile>-->
                        <!--</systemPropertyVariables>-->
                    <!--</configuration>-->
                    <!--<executions>-->
                        <!--<execution>-->
                            <!--<goals>-->
                                <!--<goal>integration-test</goal>-->
                                <!--<goal>verify</goal>-->
                            <!--</goals>-->
                        <!--</execution>-->
                    <!--</executions>-->
                <!--</plugin>-->
                <!--<plugin>-->
                    <!--<groupId>io.fabric8</groupId>-->
                    <!--<artifactId>docker-maven-plugin</artifactId>-->
                    <!--<version>0.20.0</version>-->
                <!--</plugin>-->
            </plugins>
        </pluginManagement>
    </build>

    <properties>

        <!--<carbon.devicemgt.version>${project.version}</carbon.devicemgt.version>-->

        <io.swagger.version>1.5.16</io.swagger.version>
        <com.fasterxml.jackson.core.version>2.9.0</com.fasterxml.jackson.core.version>

        <servlet-api-version>3.1.0</servlet-api-version>
        <testng.version>6.9.10</testng.version>
        <javax.ws.rs-api.version>2.0</javax.ws.rs-api.version>

        <org.osgi.core.version>6.0.0</org.osgi.core.version>
        <equinox.osgi.version>3.10.2.v20150203-1939</equinox.osgi.version>
        <equinox.osgi.services.version>3.4.0.v20140312-2051</equinox.osgi.services.version>

        <datasources.core.package.import.version.range>[1.0.0, 2.0.0)</datasources.core.package.import.version.range>

        <org.wso2.msf4j.version>2.3.0-m1</org.wso2.msf4j.version>
        <msf4j.package.import.version.range>[2.0.0, 3.0.0)</msf4j.package.import.version.range>

        <javax.ws.rs.import.version.range>[2.0.0,3.0.0)</javax.ws.rs.import.version.range>
        <slf4j.logging.package.import.version.range>[1.7.1, 2.0.0)</slf4j.logging.package.import.version.range>

        <carbon.feature.plugin.version>3.0.0</carbon.feature.plugin.version>
        <carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>

        <h2.version>1.4.192</h2.version>

    </properties>

</project>
