<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2020, 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>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <modules>
        <module>component</module>
        <module>features</module>
    </modules>
    <groupId>org.wso2.am.analytics.publisher</groupId>
    <artifactId>apim-analytics-publisher-parent</artifactId>
    <version>1.0.5</version>
    <name>APIM Analytics Publisher</name>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.azure</groupId>
                <artifactId>azure-messaging-eventhubs</artifactId>
                <version>${azure.messaging.evenhub.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j.version}</version>
                <scope>test</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wso2.am.analytics.publisher</groupId>
                <artifactId>org.wso2.am.analytics.publisher.client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.com.azure</groupId>
                <artifactId>azure-core</artifactId>
                <version>${azure-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.com.azure</groupId>
                <artifactId>azure-core-amqp</artifactId>
                <version>${azure-core-amqp.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.com.azure</groupId>
                <artifactId>azure-messaging-eventhubs</artifactId>
                <version>${azure-messaging-eventhubs.version}</version>
            </dependency>
            <dependency>
                <groupId>org.wso2.orbit.io.projectreactor</groupId>
                <artifactId>reactor-core</artifactId>
                <version>${reactor-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.qpid</groupId>
                <artifactId>proton-j</artifactId>
                <version>${proton-j.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.openfeign</groupId>
                <artifactId>feign-core</artifactId>
                <version>${openfeign.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.openfeign</groupId>
                <artifactId>feign-slf4j</artifactId>
                <version>${openfeign.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.openfeign</groupId>
                <artifactId>feign-gson</artifactId>
                <version>${openfeign.version}</version>
            </dependency>
            <dependency>
                <groupId>ua.parser.wso2</groupId>
                <artifactId>ua-parser</artifactId>
                <version>${ua_parser.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jacoco</groupId>
                <artifactId>org.jacoco.agent</artifactId>
                <classifier>runtime</classifier>
                <version>${jacoco.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mock-server</groupId>
                <artifactId>mockserver-netty</artifactId>
                <version>${mockserver-netty.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${log4j2.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <pluginManagement>
            <plugins>
                <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>
                                <!-- Sets the path to the file which contains the execution data. -->
                                <destFile>${basedir}/target/coverage-reports/jacoco-ut.exec</destFile>
                            </configuration>
                        </execution>
                        <!-- attached to Maven test phase -->
                        <execution>
                            <id>post-unit-test</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                                <!-- Sets the path to the file which contains the execution data. -->
                                <dataFile>${basedir}/target/coverage-reports/jacoco-ut.exec</dataFile>
                                <!-- Sets the output directory for the code coverage report. -->
                                <outputDirectory>${basedir}/target/coverage-reports/site/jacoco-ut</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-check</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <dataFile>${basedir}/target/coverage-reports/jacoco-ut.exec</dataFile>
                                <rules>
                                    <rule>
                                        <element>BUNDLE</element>
                                        <limits>
                                            <limit>
                                                <counter>INSTRUCTION</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>0.50</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>
            </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>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${maven.findbugsplugin.version}</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                    <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
                    <!--Exclude sources-->
                    <excludeFilterFile>${maven.findbugsplugin.exclude.file}</excludeFilterFile>
                </configuration>
                <executions>
                    <execution>
                        <id>analyze-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <log4j.version>1.2.17.wso2v1</log4j.version>
        <gson.import.version.range>[2.0.0, 3.0.0)</gson.import.version.range>
        <azure.messaging.evenhub.version>5.3.1</azure.messaging.evenhub.version>
        <gson.version>2.8.6</gson.version>
        <slf4j.version>1.7.2</slf4j.version>
        <log4j.version>1.2.12</log4j.version>
        <log4j2.version>2.17.1</log4j2.version>
        <junit.version>4.13.1</junit.version>
        <testng.version>6.10</testng.version>
        <maven.findbugsplugin.version>3.0.5</maven.findbugsplugin.version>
        <maven.findbugsplugin.exclude.file>findbugs-exclude.xml</maven.findbugsplugin.exclude.file>
        <carbon.feature.plugin.version>3.1.4</carbon.feature.plugin.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <azure-core.version>1.9.0.wso2v1</azure-core.version>
        <azure-core-amqp.version>1.6.0.wso2v1</azure-core-amqp.version>
        <azure-messaging-eventhubs.version>1.6.0.wso2v1</azure-messaging-eventhubs.version>
        <reactor-core.version>3.3.9.wso2v1</reactor-core.version>
        <proton-j.version>0.33.4</proton-j.version>
        <openfeign.version>11.0</openfeign.version>
        <azure.core.import.version.range>[1.9.0, 2.0.0)</azure.core.import.version.range>
        <azure.messaging.import.version.range>[5.3.1, 6.0.0)</azure.messaging.import.version.range>
        <google.gson.import.version.range>[2.8.0, 3.0.0)</google.gson.import.version.range>
        <feign.import.version.range>[11.0.0, 12.0.0)</feign.import.version.range>
        <apache.log4j.import.version.range>[2.17.0, 3.0.0)</apache.log4j.import.version.range>
        <ua_parser.version>1.3.0.wso2v2</ua_parser.version>
        <ua_parser.import.version.range>[1.3.0,2)</ua_parser.import.version.range>
        <jacoco.version>0.8.6</jacoco.version>
        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
        <mockserver-netty.version>3.10.8</mockserver-netty.version>
    </properties>
    <scm>
        <url>https://github.com/wso2/apim-analytics-publisher.git</url>
        <developerConnection>scm:git:https://github.com/wso2/apim-analytics-publisher.git</developerConnection>
        <connection>scm:git:https://github.com/wso2/apim-analytics-publisher.git</connection>
        <tag>v1.0.5</tag>
    </scm>
</project>