<?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>

    <groupId>org.b2code</groupId>
    <artifactId>keycloak-geoaware-parent</artifactId>
    <version>1.1.0</version>
    <packaging>pom</packaging>

    <name>Keycloak GeoAware Parent</name>
    <description>Keycloak GeoAware is an advanced feature extension for Keycloak that integrates geolocation and device monitoring into the authentication process.</description>
    <url>https://github.com/b2-code/Keycloak-GeoAware</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>BenLad17</id>
            <name>Benedikt Ladzik</name>
            <email>ben@b2code.org</email>
            <organization>b2-code</organization>
            <organizationUrl>https://github.com/B2-Code</organizationUrl>
        </developer>
        <developer>
            <id>NobelNerdBenne</id>
            <name>Benedikt Rohlf</name>
            <email>benne@b2code.org</email>
            <organization>b2-code</organization>
            <organizationUrl>https://github.com/B2-Code</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/B2-Code/keycloak-geoaware.git</connection>
        <developerConnection>scm:git:https://github.com/B2-Code/keycloak-geoaware.git</developerConnection>
        <url>https://github.com/B2-Code/keycloak-geoaware</url>
    </scm>

    <modules>
        <module>provider</module>
        <module>integration-test</module>
    </modules>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <version.keycloak>26.6.3</version.keycloak>
        <version.geoip2>5.1.0</version.geoip2>
        <version.ipinfo>3.4.0</version.ipinfo>
        <version.lombok>1.18.46</version.lombok>
        <version.auto-service>1.1.1</version.auto-service>
        <version.validation-api>3.1.1</version.validation-api>
        <version.apache-commons-compress>1.28.0</version.apache-commons-compress>
        <version.apache-commons-lang>3.20.0</version.apache-commons-lang>
        <version.geotools>35.0</version.geotools>

        <version.junit>6.1.0</version.junit>
        <version.restassured>5.5.1</version.restassured>
        <version.jboss.slf4j-logmanager>2.0.1.Final</version.jboss.slf4j-logmanager>
        <version.jacoco-maven-plugin>0.8.15</version.jacoco-maven-plugin>

        <skipTests>false</skipTests>
        <skipITs>${skipTests}</skipITs>
        <skipUTs>${skipTests}</skipUTs>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.keycloak</groupId>
                <artifactId>keycloak-parent</artifactId>
                <version>${version.keycloak}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.geotools</groupId>
                <artifactId>gt-bom</artifactId>
                <version>${version.geotools}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.junit}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${version.lombok}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${version.jacoco-maven-plugin}</version>
                <configuration>
                    <append>true</append>
                    <includes>org/b2code/**</includes>
                </configuration>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>osgeo</id>
            <name>OSGeo Release Repository</name>
            <url>https://repo.osgeo.org/repository/release/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals><goal>sign</goal></goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.11.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>