<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>it.pigrecofvg.pgauth</groupId>
    <artifactId>pgauth-starter</artifactId>
    <version>2.1.2</version>

    <properties>
        <maven.compiler.release>21</maven.compiler.release>
        <springboot.version>4.1.0</springboot.version>
    </properties>

    <!--
        Questo POM non ha parent, quindi importa il BOM di Boot: allinea in un colpo
        solo le versioni di tutte le dipendenze gestite. Serve anche per spring-webflux
        e reactor-core, che NON hanno la versione di Boot (sono 7.x e 3.x) e hardcodarle
        le farebbe divergere al prossimo upgrade di springboot.version.
    -->
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${springboot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </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-starter-web</artifactId>
        </dependency>

        <!--
            Solo spring-webflux, NON spring-boot-starter-webflux: di WebFlux qui si usa
            unicamente WebClient (13 chiamate, tutte con .block(), nessun Mono/Flux nelle
            firme pubbliche). Lo starter completo trascinerebbe reactor-netty e ~24 jar
            Netty, di cui 12 MB di binari nativi QUIC/epoll per 5 piattaforme.
            Senza reactor-netty WebClient ricade su JdkClientHttpConnector.
        -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webflux</artifactId>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>
        <dependency>
            <groupId>it.pigrecofvg.pgauth</groupId>
            <artifactId>pgauthlibrary</artifactId>
            <version>2.1.2</version>
        </dependency>

        <!-- Necessaria solo per le estensioni Pebble in pebble/extensions.
             Provided: l'applicazione consumatrice fornisce già Pebble. -->
        <dependency>
            <groupId>io.pebbletemplates</groupId>
            <artifactId>pebble</artifactId>
            <version>4.1.2</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <repositories>
        <repository>
            <id>pigreco</id>
            <url>https://forgejo.pigrecofvg.it/api/packages/pigreco/maven</url>
        </repository>
    </repositories>
    <distributionManagement>
        <repository>
            <id>pigreco</id>
            <url>https://forgejo.pigrecofvg.it/api/packages/pigreco/maven</url>
        </repository>
        <snapshotRepository>
            <id>pigreco</id>
            <url>https://forgejo.pigrecofvg.it/api/packages/pigreco/maven</url>
        </snapshotRepository>
    </distributionManagement>

</project>
