<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
    <groupId>org.mule.commons</groupId>
    <artifactId>atlantic</artifactId>
    <version>2.0.3</version>
    <packaging>jar</packaging>
    <name>Project Atlantic</name>
    <description>The purpose of this library is to provide a fluent way of enhancing the execution of methods and constructors so that it can be possible to add listeners before, after, run on separate threads and catch exceptions on them.</description>

    <licenses>
        <license>
            <name>Salesforce Main Services Agreement</name>
            <url>https://www.salesforce.com/en-us/wp-content/uploads/sites/4/documents/legal/Salesforce_MSA.pdf</url>
        </license>
    </licenses>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <formatterGoal>validate</formatterGoal>
        <hamcrest.version>3.0</hamcrest.version>
        <jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
        <javaFormatter.plugin.version>2.16.0</javaFormatter.plugin.version>
        <junit.version>5.14.4</junit.version>
        <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
        <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
        <license-enforcement-maven-plugin.version>2.7.1</license-enforcement-maven-plugin.version>
        <license.maven.plugin.version>4.6</license.maven.plugin.version>
        <licensePath>LICENSE_HEADER.txt</licensePath>
        <licenseYear>2026</licenseYear>
        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
        <mockito-core.version>4.11.0</mockito-core.version>
        <skipCPALVerifications>false</skipCPALVerifications>
        <skipVerifications>false</skipVerifications>
        <slf4j.version>1.7.36</slf4j.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito-core.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>validate-license-checksums</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireTextFileChecksum>
                                    <file>${project.basedir}/LICENSE.txt</file>
                                    <checksum>5d1dfb7400134f9922e8d6106285a97f0119acddc4cff320e2a6cb3b9bd8ac88</checksum>
                                    <type>sha256</type>
                                    <normalizeLineSeparatorTo>UNIX</normalizeLineSeparatorTo>
                                    <encoding>UTF-8</encoding>
                                    <message>The LICENSE.txt file has been modified and does not match the required text.</message>
                                    <nonexistentFileMessage>The LICENSE.txt file is missing from the repository root.</nonexistentFileMessage>
                                </requireTextFileChecksum>
                                <requireTextFileChecksum>
                                    <file>${project.basedir}/LICENSE_HEADER.txt</file>
                                    <checksum>d53c60030c6bb27590c509a1750b1bd3451548c7fb6644e8406861e06f35e6c2</checksum>
                                    <type>sha256</type>
                                    <normalizeLineSeparatorTo>UNIX</normalizeLineSeparatorTo>
                                    <encoding>UTF-8</encoding>
                                    <message>The LICENSE_HEADER.txt file has been modified and does not match the required text.</message>
                                    <nonexistentFileMessage>The LICENSE_HEADER.txt file is missing from the repository root.</nonexistentFileMessage>
                                </requireTextFileChecksum>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-enforcement-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-banned-licenses</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>add-third-party</goal>
                        </goals>
                        <configuration>
                            <failOnBlacklist>true</failOnBlacklist>
                            <failOnMissing>true</failOnMissing>
                            <excludedLicenses>
                                <excludedLicense>CPAL</excludedLicense>
                                <excludedLicense>Common Public Attributions</excludedLicense>
                                <excludedLicense>CPAL v1.0</excludedLicense>
                            </excludedLicenses>
                            <skipAddThirdParty>${skipCPALVerifications}</skipAddThirdParty>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license.maven.plugin.version}</version>
                <configuration>
                    <header>${licensePath}</header>
                    <properties>
                        <year>${licenseYear}</year>
                    </properties>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${javaFormatter.plugin.version}</version>
                <configuration>
                    <compilerCompliance>${maven.compiler.source}</compilerCompliance>
                    <compilerSource>${maven.compiler.source}</compilerSource>
                    <compilerTargetPlatform>${maven.compiler.source}</compilerTargetPlatform>
                    <configFile>${basedir}/${formatterConfigPath}</configFile>
                    <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                    <aggregator>false</aggregator>
                    <executionRoot>true</executionRoot>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>apply-format</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>${formatterGoal}</goal>
                        </goals>
                        <configuration>
                            <skipFormatting>${skipVerifications}</skipFormatting>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>check-coverage</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit>
                                            <counter>LINE</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.90</minimum>
                                        </limit>
                                        <limit>
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.90</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-deploy-plugin</artifactId>
              <version>${maven.deploy.plugin.version}</version>
            </plugin>
        </plugins>
    </build>

</project>
