<?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>org.openconext</groupId>
    <artifactId>manage</artifactId>
    <version>9.7.2-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>manage</name>
    <description>Metadata Repository</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.5.7</version>
    </parent>

    <modules>
        <module>manage-server</module>
        <module>manage-gui</module>
    </modules>

    <properties>
        <!-- Project configuration -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>21</java.version>
        <maven.version>3.8.4</maven.version>
        <node.version>v24.11.0</node.version>
        <yarn.version>v1.22.22</yarn.version>

        <!-- OpenConext dependencies -->
        <java-crypto.version>4.0.2</java-crypto.version>
        <threshold-logger.version>2.0.1</threshold-logger.version>

        <!-- Other dependencies -->
        <awaitility.version>4.1.1</awaitility.version>
        <commons-io.version>2.14.0</commons-io.version>
        <compiler.version>0.9.10</compiler.version>
        <dependency-check-maven.version>12.1.3</dependency-check-maven.version>
        <ecs-logging-java.version>1.6.0</ecs-logging-java.version>
        <everit-json-schema.version>1.14.4</everit-json-schema.version>
        <frontend-maven-plugin.version>1.11.3</frontend-maven-plugin.version>
        <javax.mail.version>1.6.2</javax.mail.version>
        <javax-validation-api.version>2.0.1.Final</javax-validation-api.version>
        <junit-jupiter-engine.version>5.12.2</junit-jupiter-engine.version>
        <json.version>20231013</json.version>
        <mongock-bom.version>5.5.1</mongock-bom.version>
        <passay.version>1.6.1</passay.version>
        <rest-assured.version>5.3.0</rest-assured.version>
        <spring-session-data-mongodb.version>3.4.4</spring-session-data-mongodb.version>
        <wagon-webdav-jackrabbit.version>3.5.1</wagon-webdav-jackrabbit.version>
        <wiremock-standalone.version>3.12.0</wiremock-standalone.version>
        <logback.version>1.5.18</logback.version>
        <logback-contrib.version>0.1.5</logback-contrib.version>
        <logstash.version>8.1</logstash.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>4.9.10</version> <!-- Hardcoded due to Maven interpolation issues for plugins -->
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <release>${java.version}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version> <!-- Hardcoded due to Maven interpolation issues for plugins -->
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${maven.version}</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${java.version}</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav-jackrabbit</artifactId>
                <version>${wagon-webdav-jackrabbit.version}</version>
            </extension>
        </extensions>
    </build>

    <profiles>
        <profile>
            <id>security-updates</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <version>${dependency-check-maven.version}</version>
                        <configuration>
                            <format>ALL</format>
                            <failBuildOnCVSS>8</failBuildOnCVSS>
                            <suppressionFile>suppressions.xml</suppressionFile>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <id>openconext-releases</id>
            <name>OpenConext public releases repository</name>
            <url>dav:https://build.openconext.org/repository/public/releases</url>
        </repository>
        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>openconext-snapshots</id>
            <name>OpenConext public snapshot repository</name>
            <url>dav:https://build.openconext.org/repository/public/snapshots</url>
        </repository>
        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
            <id>spring-milestones</id>
            <name>spring-milestones</name>
            <url>https://repo.spring.io/milestone/</url>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>openconext-releases</id>
            <name>OpenConext public releases repository</name>
            <url>dav:https://build.openconext.org/repository/public/releases</url>
        </repository>
        <snapshotRepository>
            <id>openconext-snapshots</id>
            <name>OpenConext public snapshot repository</name>
            <url>dav:https://build.openconext.org/repository/public/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>
