<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <url>https://github.com/jeap-admin-ch/jeap-opensearch-client-starter/tree/main</url>
    <scm>
        <url>https://github.com/jeap-admin-ch/jeap-opensearch-client-starter.git</url>
        <connection>scm:git:git://github.com/jeap-admin-ch/jeap-opensearch-client-starter.git</connection>
        <developerConnection>scm:git:ssh://github.com:jeap-admin-ch/jeap-opensearch-client-starter.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <name>BIT</name>
            <email>jeap-community@bit.admin.ch</email>
            <organization>Federal Office of Information Technology, Systems and Telecommunication FOITT</organization>
            <organizationUrl>https://www.bit.admin.ch/</organizationUrl>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <parent>
        <groupId>ch.admin.bit.jeap</groupId>
        <artifactId>jeap-internal-spring-boot-parent</artifactId>
        <version>8.3.1</version>
    </parent>

    <artifactId>jeap-opensearch-client-starter</artifactId>
    <name>jeap-opensearch-client-starter</name>
    <version>1.2.0</version>
    <description>
        Spring-Boot-Starter for type-safe, authorization-aware read access to OpenSearch indices with mappings based
        on jEAP index type descriptors.
    </description>

    <properties>
        <maven.javadoc.skip>false</maven.javadoc.skip>
        <jeap-opensearch-index-type.version>1.2.0</jeap-opensearch-index-type.version>
        <jeap-starter.version>23.7.0</jeap-starter.version>
        <opensearch-java.version>3.9.0</opensearch-java.version>
        <opensearch-testcontainers.version>2.1.3</opensearch-testcontainers.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ch.admin.bit.jeap</groupId>
                <artifactId>jeap-opensearch-index-type</artifactId>
                <version>${jeap-opensearch-index-type.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.opensearch.client</groupId>
            <artifactId>opensearch-java</artifactId>
            <version>${opensearch-java.version}</version>
        </dependency>

        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>url-connection-client</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>auth</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>regions</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>ch.admin.bit.jeap</groupId>
            <artifactId>jeap-opensearch-index-type</artifactId>
        </dependency>

        <dependency>
            <groupId>ch.admin.bit.jeap</groupId>
            <artifactId>jeap-spring-boot-security-starter</artifactId>
            <version>${jeap-starter.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- TEST -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opensearch</groupId>
            <artifactId>opensearch-testcontainers</artifactId>
            <version>${opensearch-testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <manifestEntries>
                                <Bundle-License>https://www.apache.org/licenses/LICENSE-2.0</Bundle-License>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.honton.chas</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-third-party</id>
                        <configuration>
                            <outputDirectory>${project.basedir}</outputDirectory>
                            <thirdPartyFilename>THIRD-PARTY-LICENSES.md</thirdPartyFilename>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
