<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The RESTEasy Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->

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

    <parent>
        <groupId>dev.resteasy.tools</groupId>
        <artifactId>resteasy-parent</artifactId>
        <version>3</version>
        <relativePath/>
    </parent>

    <groupId>dev.resteasy.junit.extension</groupId>
    <artifactId>resteasy-junit-extension-parent</artifactId>
    <version>1.0.0.Alpha2</version>
    <packaging>pom</packaging>
    <name>RESTEasy JUnit 5: Parent</name>
    <description/>

    <url>https://resteasy.dev</url>
    <inceptionYear>2024</inceptionYear>
    <organization>
        <name>Red Hat, Inc.</name>
        <url>https://redhat.com</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License Version 2.0</name>
            <url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>jamezp</id>
            <name>James R Perkins</name>
            <email>jperkins@redhat.com</email>
            <organization>Red Hat, Inc.</organization>
            <organizationUrl>https://redhat.com</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>extension</module>
        <module>testsuite</module>
    </modules>

    <scm>
        <connection>scm:git:git://git@github.com:resteasy/resteasy-junit-extension.git</connection>
        <developerConnection>scm:git:ssh://github.com/resteasy/resteasy-junit-extension.git</developerConnection>
        <url>git://github.com/resteasy/resteasy-junit-extension.git</url>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/resteasy/resteasy-junit-extension/issues</url>
    </issueManagement>

    <properties>
        <!-- Dependency Versions, keep in alphabetical order -->
        <version.jakarta.ee>10.0.0</version.jakarta.ee>
        <version.org.jboss.logging>3.6.0.Final</version.org.jboss.logging>
        <version.org.jboss.resteasy>6.2.10.Final</version.org.jboss.resteasy>
        <version.org.junit>5.11.0</version.org.junit>
        <version.org.kohsuke.metainf-services>1.11</version.org.kohsuke.metainf-services>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>jakarta.platform</groupId>
                <artifactId>jakarta.jakartaee-bom</artifactId>
                <version>${version.jakarta.ee}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-bom</artifactId>
                <version>${version.org.jboss.resteasy}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.org.junit}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.kohsuke.metainf-services</groupId>
                <artifactId>metainf-services</artifactId>
                <version>${version.org.kohsuke.metainf-services}</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Test to generate META-INF/services and should not be leaked outside of this project -->
        <dependency>
            <groupId>org.kohsuke.metainf-services</groupId>
            <artifactId>metainf-services</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.kohsuke.metainf-services</groupId>
                            <artifactId>metainf-services</artifactId>
                            <version>${version.org.kohsuke.metainf-services}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>format-check</id>
            <build>
                <plugins>
                    <!-- Validate formatting -->
                    <plugin>
                        <groupId>net.revelc.code.formatter</groupId>
                        <artifactId>formatter-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>validate-format</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>validate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code</groupId>
                        <artifactId>impsort-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check-import-sort</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
