<?xml version="1.0" encoding="UTF-8"?><!-- Copyright 2015-2017 floragunn GmbH
  Licensed 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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.floragunn</groupId>
    <artifactId>search-guard-parent</artifactId>
    <version>7.35.1</version>
  </parent>

  <artifactId>search-guard-7</artifactId>
  <packaging>jar</packaging>
  <!-- 7.x.y-a.b.c-->
  <version>7.2.1-37.0.0</version>
  <name>Search Guard</name>
  <description>Provide access control related features for Elasticsearch 6</description>
  <url>https://github.com/floragunncom/search-guard</url>
  <inceptionYear>2015</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <enterprise-modules.version>7.2.1-37.0.0</enterprise-modules.version>
    <elasticsearch.version>7.2.1</elasticsearch.version>
    
    <!-- deps -->
    <netty-native.version>2.0.25.Final</netty-native.version>
    <bc.version>1.62</bc.version>
    <log4j.version>2.11.1</log4j.version>
    <guava.version>25.1-jre</guava.version>
    <commons.cli.version>1.3.1</commons.cli.version>
    <jackson-databind.version>2.8.11.3</jackson-databind.version>
    
    <!-- assembly descriptors -->
    <elasticsearch.assembly.descriptor>${basedir}/src/main/assemblies/plugin.xml</elasticsearch.assembly.descriptor>
    <sgstandalone.descriptor>${basedir}/src/main/assemblies/sgadmin-standalone.xml</sgstandalone.descriptor>
    <veracode.descriptor>${basedir}/src/main/assemblies/veracode.xml</veracode.descriptor>
    
    <!-- Test only -->
    <mockito.version>2.23.0</mockito.version>
  </properties>

  <scm>
    <url>https://github.com/floragunncom/search-guard</url>
    <connection>scm:git:git@github.com:floragunncom/search-guard.git</connection>
    <developerConnection>scm:git:git@github.com:floragunncom/search-guard.git</developerConnection>
    <tag>v7.2.1-37.0.0</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/floragunncom/search-guard/issues</url>
  </issueManagement>

  <dependencies>

    <!-- Netty 4 transport -->
    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>transport-netty4-client</artifactId>
      <version>${elasticsearch.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>jna</artifactId>
          <groupId>org.elasticsearch</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jts</artifactId>
          <groupId>com.vividsolutions</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j-api</artifactId>
          <groupId>org.apache.logging.log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spatial4j</artifactId>
          <groupId>org.locationtech.spatial4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Guava -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>

    <!-- Apache commons cli -->
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>${commons.cli.version}</version>
    </dependency>

    <!-- Bouncycastle -->
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpg-jdk15on</artifactId>
      <version>${bc.version}</version>
    </dependency>

    <!-- provided scoped deps -->
    <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
      <version>${elasticsearch.version}</version>
      <scope>provided</scope>
    </dependency>

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


    <!-- Only test scoped dependencies hereafter -->
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <scope>test</scope>
    </dependency>

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

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>reindex-client</artifactId>
      <version>${elasticsearch.version}</version>
      <scope>test</scope>
      <exclusions>
      <exclusion>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch-ssl-config</artifactId>
      </exclusion>
      <exclusion>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
      </exclusion>
      
      </exclusions>
    </dependency>
    
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.3</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpcore</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

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

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

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

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

    <dependency>
      <groupId>org.elasticsearch.plugin</groupId>
      <artifactId>aggs-matrix-stats-client</artifactId>
      <version>${elasticsearch.version}</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>

        <configuration>
          <argLine>-Xmx3072m</argLine>
          <rerunFailingTestsCount>3</rerunFailingTestsCount>
          <forkCount>3</forkCount>
          <reuseForks>true</reuseForks>
          <!-- 
          <parallel>methods</parallel>
          <threadCount>1</threadCount>
           -->
          <systemPropertyVariables>
              <forkno>fork_${surefire.forkNumber}</forkno>
          </systemPropertyVariables>
        
          <includes>
              <include>**/*.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>enterprise</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>plugin</id>
                <phase>package</phase>
                <configuration>
                  <appendAssemblyId>false</appendAssemblyId>
                  <tarLongFileMode>posix</tarLongFileMode>
                  <outputDirectory>${project.build.directory}/releases/</outputDirectory>
                  <descriptors>
                    <descriptor>${elasticsearch.assembly.descriptor}</descriptor>
                  </descriptors>
                </configuration>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
              <execution>
                <id>sgadmin</id>
                <phase>package</phase>
                <configuration>
                  <appendAssemblyId>true</appendAssemblyId>
                  <tarLongFileMode>posix</tarLongFileMode>
                  <outputDirectory>${project.build.directory}/releases/</outputDirectory>
                  <descriptors>
                    <descriptor>${sgstandalone.descriptor}</descriptor>
                  </descriptors>
                </configuration>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.floragunn</groupId>
            <artifactId>checksum-maven-plugin</artifactId>
            <version>1.7.1</version>
              <executions>
                  <execution>
                      <goals>
                          <goal>files</goal>
                      </goals>
                      <phase>package</phase>
                  </execution>
              </executions>
            <configuration>
                <fileSets>
                    <fileSet>
                        <directory>${project.build.directory}/releases/</directory>
                        <includes>
                            <include>*.zip</include>
                        </includes>
                        <excludes>
                            <exclude>*sgadmin*</exclude>
                        </excludes>
                    </fileSet>
                </fileSets>
                  <algorithms>
                    <algorithm>SHA-512</algorithm>
                  </algorithms>
                  <individualFiles>true</individualFiles>
                  <appendFilename>true</appendFilename>
                  <attachChecksums>true</attachChecksums>
                  <csvSummary>false</csvSummary>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>com.floragunn</groupId>
          <artifactId>dlic-search-guard-enterprise-modules</artifactId>
          <version>${enterprise-modules.version}</version>
          <exclusions>
            <exclusion>
              <artifactId>jna</artifactId>
              <groupId>org.elasticsearch</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jts</artifactId>
              <groupId>com.vividsolutions</groupId>
            </exclusion>
            <exclusion>
              <artifactId>log4j-api</artifactId>
              <groupId>org.apache.logging.log4j</groupId>
            </exclusion>
            <exclusion>
              <artifactId>spatial4j</artifactId>
              <groupId>org.locationtech.spatial4j</groupId>
            </exclusion>
          </exclusions>
          </dependency>
          <dependency>	
            <groupId>org.elasticsearch.plugin</groupId>	
              <artifactId>lang-mustache-client</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>aggs-matrix-stats-client</artifactId>	
              <version>${elasticsearch.version}</version>	
            </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>veracode</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>veracode</id>
                <phase>package</phase>
                <configuration>
                  <appendAssemblyId>true</appendAssemblyId>
                  <tarLongFileMode>posix</tarLongFileMode>
                  <outputDirectory>${project.build.directory}/veracode/</outputDirectory>
                  <descriptors>
                    <descriptor>${veracode.descriptor}</descriptor>
                  </descriptors>
                </configuration>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>com.floragunn</groupId>
          <artifactId>dlic-search-guard-enterprise-modules</artifactId>
          <version>${enterprise-modules.version}</version>
        </dependency>
        <!-- omit  netty-tcnative and conscrypt-openjdk-uber if scan
             should be done without natives -->
        <dependency>
          <groupId>io.netty</groupId>
          <artifactId>netty-tcnative</artifactId>
          <version>${netty-native.version}</version>
          <classifier>linux-x86_64</classifier>
        </dependency>
        <dependency>
          <groupId>org.conscrypt</groupId>
          <artifactId>conscrypt-openjdk-uber</artifactId>
          <version>1.0.0.RC9</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>with-static-openssl-linux-non-fedora</id>
      <dependencies>
        <dependency>
          <groupId>com.floragunn</groupId>
          <artifactId>search-guard-static-tcnative-beta</artifactId>
          <version>1.1.1c-${netty-native.version}-non-fedora-linux-x86_64</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>with-static-openssl-linux-fedora</id>
      <dependencies>
        <dependency>
          <groupId>com.floragunn</groupId>
          <artifactId>search-guard-static-tcnative-beta</artifactId>
          <version>1.1.1c-${netty-native.version}-fedora-linux-x86_64</version>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>with-dynamic-openssl</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.netty</groupId>
          <artifactId>netty-tcnative</artifactId>
          <version>${netty-native.version}</version>
          <classifier>${os.detected.classifier}</classifier>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
