<?xml version="1.0" encoding="UTF-8"?>
<!-- ~ Copyright 2015-2017 floragunn GmbH ~ ~ This program is licensed to
	you under the Apache License Version 2.0, ~ and you may not use this file
	except in compliance with the Apache License Version 2.0. ~ You may obtain
	a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
	~ ~ Unless required by applicable law or agreed to in writing, ~ software
	distributed under the Apache License Version 2.0 is distributed on an ~ "AS
	IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
	implied. ~ See the Apache License Version 2.0 for the specific language governing
	permissions and limitations there under. -->
<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>com.floragunn</groupId>
  <artifactId>search-guard-flx-parent</artifactId>
  <version>4.0.0-es-9.1.5</version>
  <packaging>pom</packaging>
  <name>Search Guard FLX</name>

  <modules>
    <module>security</module>
    <module>security-legacy</module>    
    <module>scheduler</module>
    <module>signals</module>
    <module>support</module>
    <module>plugin</module>
    <module>ssl</module>
  </modules>
  <scm>
    <connection>scm:git:git@git.floragunn.com/search-guard/search-guard-suite.git</connection>
    <developerConnection>scm:git:git@git.floragunn.com/search-guard/search-guard-suite.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://git.floragunn.com/search-guard/search-guard-suite/</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>release</id>
      <name>Release repository</name>
      <url>https://maven.search-guard.com:443/search-guard-flx-release</url>
    </repository>
    <snapshotRepository>
      <id>snapshot</id>
      <name>Snapshot repository</name>
      <url>https://maven.search-guard.com:443/search-guard-flx-snapshot</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <elasticsearch.version>9.1.0</elasticsearch.version>
    <sg-suite.version>master-SNAPSHOT</sg-suite.version>
    <revision>${sg-suite.version}-es-${elasticsearch.version}</revision>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <dependency.locations.enabled>false</dependency.locations.enabled>
    <maven.compiler.release>17</maven.compiler.release>

    <netty.version>4.2.7.Final</netty.version>
    <bc.version>1.82</bc.version>
    <log4j.version>2.25.2</log4j.version>
    <jackson.version>2.17.1</jackson.version>
    <cxf.version>4.1.3</cxf.version>
    <http.commons.version>4.5.14</http.commons.version>
    <opensaml.version>4.3.0</opensaml.version>
    <opensaml.patch.version>4.3.0-1.0.3</opensaml.patch.version>
    <mockito.version>5.20.0</mockito.version>

    <!-- For mvn license:aggregate-add-third-party -->
    <license.excludedArtifacts>.*search-guard.*</license.excludedArtifacts>
    <license.excludedScopes>test,provided</license.excludedScopes>
  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>codova</artifactId>
        <version>1.10.1</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>dlic-search-guard-flx-dlsfls</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>dlic-search-guard-flx-fe-multi-tenancy</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>dlic-search-guard-flx-security</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>fluent-collections</artifactId>
        <version>1.3.0</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-scheduler</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-security</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-legacy-test-framework</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-ssl</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-support</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn.dependencies.org.opensaml</groupId>
        <artifactId>opensaml-xmlsec-impl-patched</artifactId>
        <version>${opensaml.patch.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.stephenc.jcip</groupId>
        <artifactId>jcip-annotations</artifactId>
        <version>1.0-1</version>
      </dependency>

      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>33.5.0-jre</version>
      </dependency>

      <dependency>
        <groupId>com.icegreen</groupId>
        <artifactId>greenmail</artifactId>
        <version>2.1.7</version>
      </dependency>
      <dependency>
        <groupId>com.jayway.jsonpath</groupId>
        <artifactId>json-path</artifactId>
        <version>2.9.0</version>
      </dependency>

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.19.0</version>
      </dependency>

      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.2</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.20.0</version>
      </dependency>
      <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>1.10.0</version>
      </dependency>

      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.14.0</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.1</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>fluent-hc</artifactId>
        <version>${http.commons.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpasyncclient</artifactId>
        <version>4.1.5</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${http.commons.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.16</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>${log4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${log4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j2-impl</artifactId>
        <version>${log4j.version}</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-lpg</artifactId>
        <version>1.0.0</version>
      </dependency>

      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcpkix-jdk18on</artifactId>
        <version>${bc.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch-ssl-config</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>aggs-matrix-stats-client</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>elasticsearch-scripting-painless-spi</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>lang-mustache</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>
      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>lang-painless</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>parent-join-client</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>percolator-client</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>
      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>reindex-client</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>
      <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>rest-root</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>elasticsearch-rest-client</artifactId>
        <version>${elasticsearch.version}</version>
      </dependency>

      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>3.0</version>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
      </dependency>

      <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>2.5.1</version>
        <exclusions>
          <exclusion>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.wiremock</groupId>
        <artifactId>wiremock</artifactId>
        <version>3.13.1</version>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>dlic-search-guard-flx-security</artifactId>
        <version>${project.version}</version>
        <classifier>tests</classifier>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-security</artifactId>
        <version>${project.version}</version>
        <classifier>tests</classifier>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-legacy-test-framework</artifactId>
        <version>${project.version}</version>
        <classifier>tests</classifier>
      </dependency>

      <dependency>
        <groupId>com.floragunn</groupId>
        <artifactId>search-guard-flx-support</artifactId>
        <version>${project.version}</version>
        <classifier>tests</classifier>
      </dependency>

      <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch</artifactId>
        <version>${elasticsearch.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch-preallocate</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>4.3.0</version>
        <scope>test</scope>
      </dependency>
      
      <dependency>
    	<groupId>com.selectivem.collections</groupId>
    	<artifactId>special-collections-complete</artifactId>
    	<version>1.4.0</version>
	  </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.19.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>

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

    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-smile</artifactId>
      <version>${jackson.version}</version>
      <scope>compile</scope>

    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <version>${jackson.version}</version>
      <scope>compile</scope>
      <exclusions>
        <!-- Exclusion because the dependent version has vulnerable dependencies. Replaced by explicit dependency just below.  -->
        <exclusion>
          <groupId>org.yaml</groupId>
          <artifactId>snakeyaml</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.floragunn</groupId>
      <artifactId>codova</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>

    <dependency>
      <!-- We explicitly depend on jakarta.activation in order to override various transitive dependencies to jakarta.activation which can trigger JAR hell issues -->
      <groupId>com.sun.activation</groupId>
      <artifactId>jakarta.activation</artifactId>
      <version>[1.2.2,1.3)</version>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
    </dependency>

    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>2.5</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <!-- We explicitly specify jakarta.activation-api as provided dependency, as the API is also provided by jakarta.activation. However the explicit provided scope avoids activation-api
			     creeping into the build by transitive dependencies -->
      <groupId>jakarta.activation</groupId>
      <artifactId>jakarta.activation-api</artifactId>
      <version>[2.0.1,2.1.2)</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>elasticsearch-rest-client</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.github.spullara.mustache.java</groupId>
      <artifactId>compiler</artifactId>
      <version>0.9.14</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>3.9.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-embedder</artifactId>
      <version>3.9.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-connector-basic</artifactId>
      <!-- The version of the dependency cannot be upgraded.
      The dependency is not used during CI test execution  -->
      <version>1.9.18</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-transport-http</artifactId>
      <version>1.9.24</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch-ssl-config</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>lang-mustache</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>parent-join</artifactId>
      <version>${elasticsearch.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>percolator</artifactId>
      <version>${elasticsearch.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>reindex</artifactId>
      <version>${elasticsearch.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>rest-root</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>test</scope>
    </dependency>
     
    <dependency>
      <groupId>com.github.stephenc.jcip</groupId>
      <artifactId>jcip-annotations</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>release</id>
      <url>https://maven.search-guard.com:443/search-guard-flx-release</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>snapshot</id>
      <url>https://maven.search-guard.com:443/search-guard-flx-snapshot</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>util-snapshot</id>
      <url>https://maven.search-guard.com:443/util-snapshot</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>util-release</id>
      <url>https://maven.search-guard.com:443/util</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>third-party</id>
      <url>https://maven.search-guard.com:443/third-party</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>elasticsearch-releases</id>
      <url>https://artifacts.elastic.co/maven</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>shibboleth</id>
      <url>https://build.shibboleth.net/nexus/content/repositories/releases/</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
  </repositories>

  <build>
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>${basedir}</directory>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE.txt</include>
          <include>THIRD-PARTY.txt</include>
          <include>KEYS</include>
        </includes>
      </resource>
      <resource>
        <filtering>false</filtering>
        <directory>${basedir}/src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <filtering>false</filtering>
        <directory>${basedir}/src/test/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <pushChanges>false</pushChanges>
            <localCheckout>true</localCheckout>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.8</version>
          <configuration>
            <keyname>${gpg.keyname}</keyname>
            <passphraseServerId>${gpg.keyname}</passphraseServerId>
          </configuration>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <goals>
                <goal>sign</goal>
              </goals>
              <phase>verify</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.4.2</version>
          <configuration>
            <excludes>
              <exclude>**/*cobertura*</exclude>
              <exclude>**/*jacoco*</exclude>
            </excludes>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Built-By>floragunn GmbH</Built-By>
                <Build-Time>${maven.build.timestamp}</Build-Time>
                <git-sha1>${git.commit.id}</git-sha1>
              </manifestEntries>
            </archive>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.1</version>
          <configuration>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
            <compilerArgument>-Xlint:unchecked</compilerArgument>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.4</version>
          <configuration>
            <!-- add-opens is necessary for powermock on Java 17 -->
            <!-- java.xml/jdk.xml.internal=ALL-UNNAMED required after wiremock bump to 3.5.4-->
            <argLine>-Xmx4g -Xms4g --add-opens java.base/sun.security.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.base=ALL-UNNAMED
              --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED</argLine>
            <rerunFailingTestsCount>3</rerunFailingTestsCount>
            <forkCount>3</forkCount>
            <reuseForks>true</reuseForks>
            <systemPropertyVariables>
              <forkno>fork_${surefire.forkNumber}</forkno>
            </systemPropertyVariables>

            <includes>
              <include>**/*.java</include>
            </includes>
            <trimStackTrace>false</trimStackTrace>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.14</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.2</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.5.4,)</version>
                  <message>Maven 3.5.4 or later required</message>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[17,)</version>
                  <message>Java 17 or later required to build the plugin</message>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.5.0</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>data</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.7.3</version>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
        <executions>
          <execution>
            <?m2e ignore?>
            <id>flatten</id>
            <goals>
              <goal>flatten</goal>
            </goals>
            <phase>process-resources</phase>
          </execution>
          <execution>
            <?m2e ignore?>
            <id>flatten.clean</id>
            <goals>
              <goal>clean</goal>
            </goals>
            <phase>clean</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.7.0</version>
      </plugin>

      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <pom>
            <includes>
              <include>pom.xml</include>
            </includes>
            <sortPom>
              <sortDependencies>scope,classifier,groupId,artifactId</sortDependencies>
            </sortPom>
          </pom>
        </configuration>
      </plugin>

    </plugins>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.7.1</version>
      </extension>
    </extensions>
  </build>

  <profiles>
    <profile>
      <id>enterprise</id>
      <activation>
        <file>
          <exists>dlic-security</exists>
        </file>
      </activation>
      <modules>
        <module>security</module>
        <module>security-legacy</module>            
        <module>scheduler</module>
        <module>signals</module>
        <module>support</module>
        <module>dlic-security</module>
        <module>dlic-signals</module>
        <module>dlic-auditlog</module>
        <module>dlic-dlsfls</module>
        <module>dlic-fe-multi-tenancy</module>
        <module>plugin</module>
      </modules>
    </profile>

    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>coverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <configuration>
              <append>true</append>
            </configuration>
            <executions>
              <execution>
                <id>agent-for-ut</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>agent-for-it</id>
                <goals>
                  <goal>prepare-agent-integration</goal>
                </goals>
              </execution>
              <execution>
                <id>jacoco-site</id>
                <goals>
                  <goal>report</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
