<?xml version="1.0" encoding="UTF-8"?><!-- Copyright 2015 floragunn UG (haftungsbeschränkt) 
  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>

  <prerequisites>
    <maven>3.1.0</maven>
  </prerequisites>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>

  <groupId>com.floragunn</groupId>
  <artifactId>search-guard-5</artifactId>
  <packaging>jar</packaging>
  <version>5.6.16-19.4</version>
  <name>Search Guard</name>
  <description>Provide access control related features for Elasticsearch 5</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>
    <sgssl.version>5.6.16-23.1</sgssl.version>
    <!-- <netty.replace.version>4.1.12.Final</netty.replace.version>  -->
    <netty-native.version>2.0.5.Final</netty-native.version>
    <elasticsearch.version>5.6.16</elasticsearch.version>
    <elasticsearch.assembly.descriptor>${basedir}/src/main/assemblies/plugin.xml</elasticsearch.assembly.descriptor>
    <sgstandalone.descriptor>${basedir}/src/main/assemblies/sgadmin-standalone.xml</sgstandalone.descriptor>
    <dependency.locations.enabled>false</dependency.locations.enabled>
  </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh-fg</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh-fg</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

  <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>v5.6.16-19.4</tag>
  </scm>

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

  <developers>
    <developer>
      <email>info (at) search-guard (dot) com</email>
      <name>floragunn UG (haftungsbeschränkt)</name>
      <url>http://www.floragunn.com</url>
      <id>floragunncom</id>
    </developer>
  </developers>

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

    <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>
       
       <!--  <exclusions>
         <exclusion>
           <artifactId>*</artifactId>
           <groupId>io.netty</groupId>
         </exclusion>
       </exclusions>  -->
    </dependency>
    
    <!-- 
    <dependency>
        <artifactId>netty-buffer</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
    
    <dependency>
        <artifactId>netty-codec</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
    
    <dependency>
        <artifactId>netty-codec-http</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
    
    <dependency>
        <artifactId>netty-common</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
    
    <dependency>
        <artifactId>netty-handler</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
    
    <dependency>
        <artifactId>netty-resolver</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
    
    <dependency>
        <artifactId>netty-transport</artifactId>
        <groupId>io.netty</groupId>
        <version>${netty.replace.version}</version>
    </dependency>
     -->

    <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>2.11.1</version>
       <scope>provided</scope>
    </dependency>

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

    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.3.1</version>
    </dependency>

    <!-- Only test scoped dependencies hereafter --> 

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

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.5</version>
      <scope>test</scope>
    </dependency>
 
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>fluent-hc</artifactId>
      <version>4.3.4</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-tcnative</artifactId>
      <version>${netty-native.version}</version>
      <classifier>${os.detected.classifier}</classifier>
      <scope>test</scope>
    </dependency>    
    
    <dependency>
       <groupId>org.elasticsearch.plugin</groupId>
       <artifactId>reindex-client</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>com.floragunn</groupId>
       <artifactId>dlic-search-guard-test-framework</artifactId>
       <version>5.3-1</version>
       <classifier>tests</classifier>
       <scope>test</scope>
    </dependency>
    
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>**/*.json</include>
          <include>**/*.yml</include>
          <include>**/*.properties</include>
          <include>**/*.jks</include>
        </includes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <includes>
            <include>**/*Test*.java</include>
          </includes>
          <forkCount>0</forkCount> <!-- needed for circleci build -->
          <reuseForks>false</reuseForks> <!-- needed for circleci build -->
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>plugin</id>
            <phase>package</phase>
            <configuration>
              <appendAssemblyId>false</appendAssemblyId>
              <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>
              <outputDirectory>${project.build.directory}/releases/</outputDirectory>
              <descriptors>
                <descriptor>${sgstandalone.descriptor}</descriptor>
              </descriptors>
            </configuration>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <arguments>-Prelease</arguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <locale>en</locale>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.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-compiler-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <encoding>UTF-8</encoding>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <formats>
            <format>xml</format>
          </formats>
          <aggregate>true</aggregate>
          <maxmem>256m</maxmem>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
    </plugins>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.4.0.Final</version>
      </extension>
    </extensions>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <keyname>51EDB2FE</keyname>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
