<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>
    <url>https://github.com/jeap-admin-ch/jeap-process-archive-reader/tree/main</url>
    <scm>
        <url>https://github.com/jeap-admin-ch/jeap-process-archive-reader.git</url>
        <connection>scm:git:git://github.com/jeap-admin-ch/jeap-process-archive-reader.git</connection>
        <developerConnection>scm:git:ssh://github.com:jeap-admin-ch/jeap-process-archive-reader.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-spring-boot-parent</artifactId>
        <version>34.12.0-alpha-springboot4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <artifactId>jeap-process-archive-reader</artifactId>
    <name>${project.groupId}:${project.artifactId}</name>
    <version>2.1.0-alpha-springboot4</version>

    <properties>
        <!-- Note: Align with version in jeap-messaging -->
        <avro.version>1.12.1</avro.version>
        <maven.javadoc.skip>false</maven.javadoc.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>s3</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>software.amazon.awssdk</groupId>
                    <artifactId>apache-client</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>software.amazon.awssdk</groupId>
                    <artifactId>netty-nio-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>url-connection-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro-compiler</artifactId>
            <version>${avro.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.admin.bit.jeap</groupId>
            <artifactId>jeap-crypto-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Add license entry to jar manifest -->
                <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>
            <!-- Check third-party license compliance -->
            <plugin>
                <groupId>org.honton.chas</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <!-- Generate third-party license list -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro-maven-plugin</artifactId>
                <version>${avro.version}</version>
                <executions>
                    <execution>
                        <id>schemas</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>schema</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>${project.basedir}/src/test/resources/avro/v3</sourceDirectory>
                            <outputDirectory>${project.basedir}/target/generated-test-sources/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
