<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.mulesoft.agent</groupId>
        <artifactId>ubp-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>ubp-runtime-agent-plugin</artifactId>

    <properties>
        <hamcrest-all.version>1.3</hamcrest-all.version>
        <ingestion-client-library.version>0.3.1</ingestion-client-library.version>
        <junit-dep.version>4.10</junit-dep.version>
        <mockito-core.version>4.11.0</mockito-core.version>
        <mule.agent.version>2.6.3-UBP-SNAPSHOT</mule.agent.version>
        <mule-ubp-meter-common.version>0.0.1-SNAPSHOT</mule-ubp-meter-common.version>
        <mule.version>4.6.0</mule.version>
        <jacoco.version>0.8.7</jacoco.version>
        <mule-module-launcher.version>4.0.0-M5.3-SNAPSHOT</mule-module-launcher.version>
        <mule-metrics.version>0.0.1-SNAPSHOT</mule-metrics.version>
        <mule-agent-configuration.version>2.6.5</mule-agent-configuration.version>
        <commons-lang3.version>3.14.0</commons-lang3.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.mulesoft.agent</groupId>
            <artifactId>mule-agent-api</artifactId>
            <version>${mule.agent.version}</version>
            <scope>provided</scope>
            <exclusions>
                <!-- Excluded after classloading issues (mule-agent-security shades a lot of dependencies) -->
                <exclusion>
                    <groupId>com.mulesoft.agent</groupId>
                    <artifactId>mule-agent-security</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.agent</groupId>
            <artifactId>mule-agent-configuration</artifactId>
            <version>${mule-agent-configuration.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.agent</groupId>
            <artifactId>mule-agent-configurable-service</artifactId>
            <version>${mule.agent.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.runtime.modules</groupId>
            <artifactId>mule-module-plugin-ee</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito-core.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest-all.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
            <version>${junit-dep.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-ubp-meter-common</artifactId>
            <version>${mule-ubp-meter-common.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-metrics-exporter-api</artifactId>
            <version>${mule-metrics.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-metrics-exporter-configuration-api</artifactId>
            <version>${mule-metrics.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.ingestion</groupId>
            <artifactId>ingestion-client-library</artifactId>
            <version>${ingestion-client-library.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>${javaVersion}</source>
                    <target>${javaVersion}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.9.0.2155</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
            </plugin>
            <!-- JaCoCo configuration -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.2</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <!--  select non-aggregate reports  -->
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <repository>
            <id>mule-ee-releases</id>
            <name>MuleSoft Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases/</url>
        </repository>
    </distributionManagement>
    <repositories>
        <repository>
            <id>mule-ee-releases</id>
            <name>MuleSoft Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases/</url>
        </repository>
        <repository>
            <id>mule-ee-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-snapshots/</url>
        </repository>
    </repositories>

</project>
