<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.ihe.gazelle</groupId>
    <artifactId>pixm-connector</artifactId>
    <packaging>pom</packaging>
    <modules>
        <module>pixm-connector-service</module>
        <module>matchbox-client</module>
        <module>http-validator-client</module>
    </modules>
    <version>3.0.1-SNAPSHOT</version>
    <name>Pixm Connector</name>

    <properties>
        <allure.junit5.version>2.25.0</allure.junit5.version>
        <allure.maven.version>2.12.0</allure.maven.version>
        <aspectj.version>1.9.7</aspectj.version>
        <caffeine.version>3.1.8</caffeine.version>
        <cors.filter.version>1.0.1</cors.filter.version>
        <cvss.score.level.tolerate>8</cvss.score.level.tolerate>
        <dependency.check.version>5.2.4</dependency.check.version>
        <dependency.check.skip>true</dependency.check.skip>
        <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
        <nexus.url>https://gazelle.ihe.net/nexus</nexus.url>
        <nexus.path>/content/groups/public/</nexus.path>
        <git.user.name>gitlab-ci</git.user.name>
        <git.user.token>changeit</git.user.token>
        <git.project.url>
            https://${git.user.name}:${git.user.token}@gitlab.inria.fr/gazelle/applications/test-execution/simulator/pixm-connector.git
        </git.project.url>
        <hapi.fhir.version>7.0.0-BETA</hapi.fhir.version>
        <maven.release.plugin.version>2.5.3</maven.release.plugin.version>
        <nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version>
        <sonar.maven.plugin>3.9.0.2155</sonar.maven.plugin>
        <java.version>17</java.version>
        <junit.jupiter.version>5.10.1</junit.jupiter.version>
        <jacoco.maven.plugin.version>0.8.11</jacoco.maven.plugin.version>
        <junit.platform.commons.version>1.7.2</junit.platform.commons.version>
        <junit.platform.launcher.version>1.7.2</junit.platform.launcher.version>
        <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
        <maven.surefire.plugin.version>3.2.3</maven.surefire.plugin.version>
        <mockito.core.version>5.8.0</mockito.core.version>
        <mockito.junit.jupiter.version>5.8.0</mockito.junit.jupiter.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <phloc.schematron.version>2.7.1</phloc.schematron.version>
        <java.string.similarity.version>2.0.0</java.string.similarity.version>
        <logback.classic.version>1.4.11</logback.classic.version>
        <javaee.api.version>8.0.1</javaee.api.version>
        <thymeleaf.version>3.1.2.RELEASE</thymeleaf.version>
        <ucum.version>1.0.8</ucum.version>
        <system.stubs.jupiter.version>2.1.5</system.stubs.jupiter.version>
        <jakarta.servlet.api.version>6.1.0-M1</jakarta.servlet.api.version>
        <jakarta.jakartaee.api.version>10.0.0</jakarta.jakartaee.api.version>
        <jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
    </properties>

    <scm>
        <connection>scm:git:${git.project.url}</connection>
        <url>scm:git:${git.project.url}</url>
        <developerConnection>scm:git:${git.project.url}</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <repositories>
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>IHE</id>
            <name>IHE Public Maven Repository Group</name>
            <url>https://gazelle.ihe.net/nexus/content/groups/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <url>https://gazelle.ihe.net/nexus/content/repositories/releases</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>pre-unit-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${sonar.maven.plugin}</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sonar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus.staging.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>default-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <serverId>nexus-releases</serverId>
                            <nexusUrl>https://gazelle.ihe.net/nexus</nexusUrl>
                            <skipStaging>true</skipStaging>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>net.ihe.gazelle</groupId>
                <artifactId>validation-jaxrs-api</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>net.ihe.gazelle</groupId>
                <artifactId>validation-api</artifactId>
                <version>1.0.0</version>
            </dependency>
            <!-- This dependency includes the core HAPI-FHIR classes -->
            <dependency>
                <groupId>ca.uhn.hapi.fhir</groupId>
                <artifactId>hapi-fhir-base</artifactId>
                <version>${hapi.fhir.version}</version>
            </dependency>
            <dependency>
                <groupId>ca.uhn.hapi.fhir</groupId>
                <artifactId>hapi-fhir-server</artifactId>
                <version>${hapi.fhir.version}</version>
            </dependency>

            <!-- At least one "structures" JAR must also be included -->
            <dependency>
                <groupId>ca.uhn.hapi.fhir</groupId>
                <artifactId>hapi-fhir-structures-r4</artifactId>
                <version>${hapi.fhir.version}</version>
            </dependency>

            <!-- Used for validation -->
            <dependency>
                <groupId>ca.uhn.hapi.fhir</groupId>
                <artifactId>hapi-fhir-validation-resources-r4</artifactId>
                <version>${hapi.fhir.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.platform</groupId>
                <artifactId>jakarta.jakartaee-api</artifactId>
                <version>${jakarta.jakartaee.api.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>${jakarta.servlet.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.fhir</groupId>
                <artifactId>ucum</artifactId>
                <version>${ucum.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>