<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.floragunn</groupId>
    <artifactId>search-guard-flx-parent</artifactId>
    <version>1.0.0-beta-3-es-8.3.3</version>
  </parent>
  <groupId>com.floragunn</groupId>
  <artifactId>search-guard-flx-elasticsearch-plugin</artifactId>
  <version>1.0.0-beta-3-es-8.3.3</version>
  <packaging>pom</packaging>
  <name>Search Guard FLX: Plugin for Elasticsearch</name>
  <properties>
    <elasticsearch.assembly.descriptor>${basedir}/src/main/assemblies/plugin.xml</elasticsearch.assembly.descriptor>
    <veracode.descriptor>${basedir}/src/main/assemblies/veracode.xml</veracode.descriptor>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${project.basedir}</directory>
              <includes>
                <include>plugin-descriptor.properties</include>
                <include>THIRD-PARTY.txt</include>
              </includes>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-test-instance-installer</id>
            <phase>package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/releases/</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/src/main/assemblies/</directory>
                  <includes>
                    <include>searchguard-test-instance-installer.sh</include>
                  </includes>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy-resources</id>
            <phase>package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/descriptor</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>dlic</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>${maven.build.helper.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>${basedir}/target/releases/searchguard-test-instance-installer.sh</file>
                      <type>sh</type>
                      <classifier>demo-installer</classifier>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.floragunn</groupId>
            <artifactId>checksum-maven-plugin</artifactId>
            <version>${checksum.maven.plugin.version}</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>files</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <fileSets>
                <fileSet>
                  <directory>${project.build.directory}/releases/</directory>
                  <includes>
                    <include>*.zip</include>
                  </includes>
                </fileSet>
              </fileSets>
              <algorithms>
                <algorithm>SHA-512</algorithm>
              </algorithms>
              <individualFiles>true</individualFiles>
              <appendFilename>true</appendFilename>
              <attachChecksums>true</attachChecksums>
              <csvSummary>false</csvSummary>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>plugin</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <appendAssemblyId>false</appendAssemblyId>
                  <tarLongFileMode>posix</tarLongFileMode>
                  <outputDirectory>${project.build.directory}/releases/</outputDirectory>
                  <descriptors>
                    <descriptor>${elasticsearch.assembly.descriptor}</descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-auditlog</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-dlsfls</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-dlsfls-legacy</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-fe-multi-tenancy</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-security</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-security-legacy</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>dlic-search-guard-flx-signals</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>search-guard-flx-scheduler</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>search-guard-flx-security</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>search-guard-flx-security-legacy</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>search-guard-flx-signals</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>search-guard-flx-ssl</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>search-guard-flx-support</artifactId>
          <version>${project.version}</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
