<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) 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="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>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>5</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.wso2.carbon.utils</groupId>
    <artifactId>carbon-utils</artifactId>
    <version>2.0.8</version>
    <packaging>pom</packaging>
    <name>WSO2 Carbon - Utils Parent</name>
    <url>http://wso2.com</url>

    <scm>
        <url>https://github.com/wso2/carbon-utils.git</url>
        <developerConnection>scm:git:https://github.com/wso2/carbon-utils.git</developerConnection>
        <connection>scm:git:https://github.com/wso2/carbon-utils.git</connection>
        <tag>v2.0.8</tag>
    </scm>
    <modules>
        <module>components/org.wso2.carbon.utils</module>
        <module>features/org.wso2.carbon.utils.feature</module>
        <module>components/org.wso2.carbon.database.utils</module>
        <module>features/org.wso2.carbon.database.utils.feature</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wso2.carbon.utils</groupId>
                <artifactId>org.wso2.carbon.utils</artifactId>
                <version>${carbon.utils.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.carbon.utils</groupId>
                <artifactId>org.wso2.carbon.database.utils</artifactId>
                <version>${carbon.database.utils.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ops4j.pax.logging</groupId>
                <artifactId>pax-logging-api</artifactId>
                <version>${pax.logging.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.logging.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jacoco</groupId>
                <artifactId>org.jacoco.agent</artifactId>
                <classifier>runtime</classifier>
                <version>${jacoco.version}</version>
            </dependency>

            <dependency>
                <groupId>com.h2database.wso2</groupId>
                <artifactId>h2-database-engine</artifactId>
                <version>${orbit.version.h2.engine}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-testng</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-dbcp</groupId>
                <artifactId>commons-dbcp</artifactId>
                <version>${commons.dbcp.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${commons.lang.version}</version>
            </dependency>

            <!--OSGi-->
            <dependency>
                <groupId>org.wso2.eclipse.osgi</groupId>
                <artifactId>org.eclipse.osgi.services</artifactId>
                <version>${equinox.osgi.services.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.felix</groupId>
                <artifactId>org.apache.felix.scr.ds-annotations</artifactId>
                <version>${apache.felix.scr.ds.annotations.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.wso2.carbon.maven</groupId>
                    <artifactId>carbon-feature-plugin</artifactId>
                    <version>${carbon.feature.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <id>default-instrument</id>
                            <goals>
                                <goal>instrument</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-restore-instrumented-classes</id>
                            <goals>
                                <goal>restore-instrumented-classes</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report-integration</id>
                            <goals>
                                <goal>report-integration</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-check</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <rule implementation="org.jacoco.maven.RuleConfiguration">
                                        <element>BUNDLE</element>
                                        <limits>
                                            <limit implementation="org.jacoco.report.check.Limit">
                                                <counter>COMPLEXITY</counter>
                                                <value>COVEREDRATIO</value>
                                                <!--<minimum>0.60</minimum>-->
                                            </limit>
                                        </limits>
                                    </rule>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!--OSGi-->
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-scr-plugin</artifactId>
                    <version>${maven.scr.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>generate-scr-scrdescriptor</id>
                            <goals>
                                <goal>scr</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean install</preparationGoals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <carbon.utils.version>2.0.8</carbon.utils.version>
        <carbon.database.utils.version>2.0.8</carbon.database.utils.version>
        <equinox.osgi.services.version>3.5.100.v20160504-1419</equinox.osgi.services.version>
        <equinox.osgi.version>3.11.0.v20160603-1336</equinox.osgi.version>
        <pax.logging.api.version>1.9.0</pax.logging.api.version>
        <slf4j.logging.api.version>1.6.1</slf4j.logging.api.version>
        <testng.version>6.9.4</testng.version>
        <jacoco.version>0.7.5.201505241946</jacoco.version>
        <orbit.version.h2.engine>1.2.140.wso2v3</orbit.version.h2.engine>
        <powermock.version>1.6.6</powermock.version>
        <commons.dbcp.version>1.4</commons.dbcp.version>
        <commons.lang3.version>3.0</commons.lang3.version>
        <commons.lang.version>2.6</commons.lang.version>

        <carbon.utils.package.export.version>${carbon.utils.version}</carbon.utils.package.export.version>
        <javax.management.import.version.range>[0.0.0,1.0.0)</javax.management.import.version.range>
        <slf4j.logging.package.import.version.range>[1.7.1, 2.0.0)</slf4j.logging.package.import.version.range>
        <carbon.core.version.range>[4.4.0, 5.0.0)</carbon.core.version.range>

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

        <osgi.service.component.imp.pkg.version.range>[1.2.0, 2.0.0)</osgi.service.component.imp.pkg.version.range>
        <osgi.framework.imp.pkg.version.range>[1.7.0, 2.0.0)</osgi.framework.imp.pkg.version.range>
        <apache.felix.scr.ds.annotations.version>1.2.4</apache.felix.scr.ds.annotations.version>
        <maven.scr.plugin.version>1.22.0</maven.scr.plugin.version>
    </properties>
</project>
