<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>io.axual.connect.plugins.azure</groupId>
    <artifactId>adls-gen2-sink</artifactId>
    <version>1.3.0</version>
    <packaging>jar</packaging>

    <name>Azure Data Lake Storage Gen2 Sink Connector for Kafka Connect</name>
    <description>Collect the records from topics in an Azure Data Lake Storage Gen2</description>

    <scm>
        <developerConnection>
            scm:git:ssh://git@gitlab.com:axual-public/connect-plugins/adls-gen2-sink-connector.git
        </developerConnection>
        <connection>
            scm:git:ssh://git@gitlab.com:axual-public/connect-plugins/adls-gen2-sink-connector.git
        </connection>
        <url>
            scm:git:ssh://git@gitlab.com:axual-public/connect-plugins/adls-gen2-sink-connector.git
        </url>
        <tag>HEAD</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Axual B.V.</name>
        <url>https://axual.io/</url>
    </organization>
    <url>https://axual.com/</url>

    <inceptionYear>2021</inceptionYear>

    <developers>
        <developer>
            <name>Team Synapse</name>
            <email>synapse@axual.com</email>
            <organization>Axual B.V.</organization>
            <organizationUrl>https://axual.com</organizationUrl>
        </developer>
    </developers>

    <!-- Added because of dependency on Avro Deserializer -->
    <repositories>
        <repository>
            <id>confluent</id>
            <url>https://packages.confluent.io/maven/</url>
        </repository>
    </repositories>

    <properties>
        <!-- Connector dependency versions -->
        <kafka.version>2.8.1</kafka.version>
        <avro.version>1.11.5</avro.version>
        <avro.serializer.version>7.0.1</avro.serializer.version>
        <snappy-java.version>1.1.10.3</snappy-java.version>
        <commons-compress.version>1.26.2</commons-compress.version>
        <commons-lang3.version>3.18.0</commons-lang3.version>
        <msal4j.version>1.20.1</msal4j.version>

        <!-- All Azure SDK versions come from this BOM, so they stay a tested set -->
        <azure.sdk.bom.version>1.2.35</azure.sdk.bom.version>

        <!-- Explicit versions because of CVEs: the Azure SDK asks for an older Netty -->
        <netty.version>4.1.136.Final</netty.version>

        <!-- Must match the Jackson version the Azure SDK is built against -->
        <jackson.version>2.18.9</jackson.version>

        <!-- Build plugin dependency versions -->
        <maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
        <maven.resources.plugin.version>3.1.0</maven.resources.plugin.version>
        <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
        <maven.jar.plugin.version>3.2.0</maven.jar.plugin.version>
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.install.plugin.version>3.1.4</maven.install.plugin.version>
        <maven.deploy.plugin.version>3.1.4</maven.deploy.plugin.version>
        <maven.dependency.plugin.version>3.1.2</maven.dependency.plugin.version>
        <maven.assembly.plugin.version>3.2.0</maven.assembly.plugin.version>
        <maven.license.plugin.version>1.9</maven.license.plugin.version>
        <maven.enforcer.plugin.version>3.5.0</maven.enforcer.plugin.version>

        <!-- DependencyCheckSettings -->
        <failOnCVSS>4</failOnCVSS>
        <owasp.dependency.check.plugin.version>7.1.0</owasp.dependency.check.plugin.version>

        <!-- Testing and test reporting settings -->
        <curator.version>5.2.1</curator.version>
        <commons-io.version>2.11.0</commons-io.version>
        <junit.jupiter.version>5.9.2</junit.jupiter.version>
        <mockito.version>5.2.0</mockito.version>
        <kafka.scala.version>2.12</kafka.scala.version>
        <awaitility.version>4.2.0</awaitility.version>
        <slf4j-api.version>1.7.36</slf4j-api.version>
        <logback.version>1.2.11</logback.version>
        <maven.surefire.plugin.version>3.0.0</maven.surefire.plugin.version>
        <maven.failsafe.plugin.version>3.0.0</maven.failsafe.plugin.version>
        <maven.jacoco.plugin.version>0.8.8</maven.jacoco.plugin.version>
        <lombok.version>1.18.24</lombok.version>
        <testcontainers.version>1.17.4</testcontainers.version>

        <maven.failsafe.surefire.reports>${project.build.directory}/surefire-reports
        </maven.failsafe.surefire.reports>
        <skipITs>false</skipITs>
        <skipUTs>false</skipUTs>
        <skipTests>false</skipTests>
        <failsafeArgLine/>
        <surefireArgLine/>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco/jacoco.xml
        </sonar.coverage.jacoco.xmlReportPaths>

        <!-- Maven Central publishing, used by the sign-artifacts profile -->
        <central.publishing.plugin.version>0.10.0</central.publishing.plugin.version>
        <sign.maven.plugin.version>1.1.0</sign.maven.plugin.version>

        <!-- Project properties -->
        <java.source.version>11</java.source.version>
        <java.target.version>11</java.target.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- License properties -->
        <license.licenseName>apache_v2</license.licenseName>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Netty and Jackson come first, so these versions win if the Azure BOM ever pins them -->
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-bom</artifactId>
                <version>${netty.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.azure</groupId>
                <artifactId>azure-sdk-bom</artifactId>
                <version>${azure.sdk.bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!--
                Libraries that arrive at two versions through different paths. The enforcer's
                dependencyConvergence rule fails the build without these, and picking the version
                here beats letting Maven's nearest-wins rule decide silently.
            -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro</artifactId>
                <version>${avro.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${commons-compress.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <!-- Keep in step with the msal4j version azure-identity brings in -->
            <dependency>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>msal4j</artifactId>
                <version>${msal4j.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
            <version>${kafka.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.azure</groupId>
            <artifactId>azure-storage-file-datalake</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <!-- Keeps the JDK TLS stack instead of the bundled BoringSSL natives -->
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-tcnative-boringssl-static</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


        <dependency>
            <groupId>com.azure</groupId>
            <artifactId>azure-identity</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
            <version>${avro.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <version>${snappy-java.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- BEGIN Log4J CVE specific inclusions-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <version>${slf4j-api.version}</version>
        </dependency>
        <!-- END Log4J CVE specific inclusions-->

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-avro-serializer</artifactId>
            <version>${avro.serializer.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.kafka</groupId>
                    <artifactId>kafka-clients</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j-api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Testing dependencies -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${awaitility.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Integration Test Dependencies -->
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-test</artifactId>
            <version>${curator.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.osgi</groupId>
                    <artifactId>org.osgi.core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Kafka Test Dependencies -->
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-runtime</artifactId>
            <version>${kafka.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.zookeeper</groupId>
                    <artifactId>zookeeper</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.kafka</groupId>
                    <artifactId>kafka-log4j-appender</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_${kafka.scala.version}</artifactId>
            <version>${kafka.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.zookeeper</groupId>
                    <artifactId>zookeeper</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Schema Registry Test Dependencies -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>3.15.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-servlet-initializer</artifactId>
            <version>3.15.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-multipart-provider</artifactId>
            <version>3.15.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson2-provider</artifactId>
            <version>3.15.1.Final</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>2.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>9.4.43.v20210629</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-joda</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/adls-gen2-sink-connector.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/adls-gen2-sink-connector.properties</exclude>
                </excludes>
            </resource>
        </resources>

        <plugins>
            <!-- clean plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${maven.clean.plugin.version}</version>
            </plugin>
            <!-- resources plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven.resources.plugin.version}</version>
            </plugin>
            <!-- compiler plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <!-- release, not source/target, so Java 12+ APIs cannot slip into a Java 11 build -->
                    <release>${java.target.version}</release>
                </configuration>
            </plugin>
            <!-- jar plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true
                            </addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Created-By>${java.vm.name} ${java.version} (${java.vm.vendor})
                            </Created-By>
                            <Implementation-Vendor-ArtifactId>${project.artifactId}
                            </Implementation-Vendor-ArtifactId>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <source>${java.source.version}</source>
                    <doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- source plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true
                            </addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Created-By>${java.vm.name} ${java.version} (${java.vm.vendor})
                            </Created-By>
                            <Implementation-Vendor-ArtifactId>${project.artifactId}
                            </Implementation-Vendor-ArtifactId>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <!-- install plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven.install.plugin.version}</version>
            </plugin>
            <!-- deploy plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.plugin.version}</version>
            </plugin>
            <!-- dependency plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
            </plugin>

            <!-- assembly plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven.assembly.plugin.version}</version>
                <configuration>
                    <descriptors>
                        <descriptor>pluginResources/assembly/without-avro-dependencies.xml
                        </descriptor>
                    </descriptors>
                    <descriptorRefs>
                        <descriptorRef>
                            jar-with-dependencies
                        </descriptorRef>
                    </descriptorRefs>

                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <addDefaultImplementationEntries>true
                            </addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true
                            </addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                    <appendAssemblyId>true</appendAssemblyId>
                </configuration>
                <executions>
                    <execution>
                        <id>assembly-jar-Id</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- license plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${maven.license.plugin.version}</version>
                <configuration>
                    <!-- Modified license headers because of strange characters-->
                    <licenseName>axual_apache_20</licenseName>
                    <licenseResolver>${project.baseUri}/pluginResources/license</licenseResolver>
                    <verbose>false</verbose>
                    <processStartTag>
                        ========================LICENSE_START=================================
                    </processStartTag>
                    <processEndTag>
                        =========================LICENSE_END==================================
                    </processEndTag>
                    <includes>
                        <includes>**/*.java</includes>
                    </includes>
                    <skipUpdateLicense>false</skipUpdateLicense>
                </configuration>
                <executions>
                    <execution>
                        <id>add-third-party-license</id>
                        <goals>
                            <goal>add-third-party</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <excludedScopes>system,test</excludedScopes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>verify-license-headers</id>
                        <goals>
                            <goal>check-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                    </execution>
                    <execution>
                        <id>generate-license-headers</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>

            <!-- failsafe plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.failsafe.plugin.version}</version>
                <configuration>
                    <skip>${skipTests}</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                        <configuration>
                            <argLine>${failsafeArgLine} -DskipUTs</argLine>
                            <skipTests>${skipITs}</skipTests>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- surefire plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <argLine>${surefireArgLine}</argLine>
                    <skipTests>${skipUTs}</skipTests>
                    <skip>${skipTests}</skip>
                    <includes>
                        <include>**/Test*.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*Tests.java</include>
                        <include>**/*TestCase.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/IT*.java</exclude>
                        <exclude>**/*IT.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- jacoco plugin -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${maven.jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <phase>test-compile</phase>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- OWASP Dependency Check plugin -->
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>${owasp.dependency.check.plugin.version}</version>
                <configuration>
                    <failBuildOnCVSS>${failOnCVSS}</failBuildOnCVSS>
                    <suppressionFile>suppressed.xml</suppressionFile>
                </configuration>
            </plugin>

            <!-- Fails the build when one library is pulled in at two versions -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin.version}</version>
                <configuration>
                    <rules>
                        <dependencyConvergence/>
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>


    <!--
        No distributionManagement on purpose. Snapshots go to Azure Artifactory, where the pipeline
        passes the repository URLs on the command line, and tagged releases go to Maven Central
        through the sign-artifacts profile below.
    -->
    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${central.publishing.plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>maven_central_releases</publishingServerId>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.simplify4u.plugins</groupId>
                        <artifactId>sign-maven-plugin</artifactId>
                        <version>${sign.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keyFile>env:SIGN_KEY</keyFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
