<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 https://maven.apache.org/maven-v4_0_0.xsd">
    <parent>
        <groupId>dev.resteasy.tools</groupId>
        <artifactId>resteasy-parent</artifactId>
        <version>2.0.3.Final</version>
        <relativePath/>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <name>RESTEasy Extensions</name>
    <description>Resteasy Extensions and Utilities</description>

    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-extensions</artifactId>
    <version>2.0.1.Final</version>
    <packaging>pom</packaging>

    <properties>
        <!-- print logs to file by default -->
        <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
        <!-- Dependency versions, please keep in alphabetical order -->
        <version.jakarta.ws.rs-api>3.1.0</version.jakarta.ws.rs-api>
        <version.org.jboss.logging.jboss-logging>3.5.0.Final</version.org.jboss.logging.jboss-logging>
        <version.org.jboss.logging.jboss-logging-annotations>2.2.1.Final
        </version.org.jboss.logging.jboss-logging-annotations>
        <version.org.jboss.resteasy>6.2.3.Final</version.org.jboss.resteasy>
        <version.org.junit>5.9.2</version.org.junit>
    </properties>

    <url>https://resteasy.dev/</url>

    <licenses>
        <license>
            <name>Eclipse Public License 2.0</name>
            <url>https://www.eclipse.org/legal/epl-v20.html</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>GNU General Public License, Version 2 with the Classpath Exception</name>
            <url>https://repository.jboss.org/licenses/gpl-2.0-ce.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/resteasy/resteasy-extensions.git</connection>
        <developerConnection>scm:git:git@github.com:resteasy/resteasy-extensions.git</developerConnection>
        <url>https://github.com/resteasy/resteasy-extensions/</url>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/resteasy/resteasy-extensions/issues</url>
    </issueManagement>

    <modules>
        <module>tracing</module>
        <module>eagledns</module>
        <module>cache</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!-- BOM Imports -->
            <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>

            <!-- Jakarta Dependencies -->
            <dependency>
                <groupId>jakarta.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <version>${version.jakarta.ws.rs-api}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.org.jboss.logging.jboss-logging}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-annotations</artifactId>
                <version>${version.org.jboss.logging.jboss-logging-annotations}</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>

            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-processor</artifactId>
                <version>${version.org.jboss.logging.jboss-logging-annotations}</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <excludePackageNames>
                            com.restfully.*:org.jboss.resteasy.examples.*:se.unlogic.*:org.jboss.resteasy.tests.*
                        </excludePackageNames>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-style</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Format source files -->
            <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>

    <repositories>
        <!-- Required for provisioning WildFly. Not all dependencies currently exist on Maven Central. This is also
             useful for when we want to test with versions releases that have not yet been synchronized to Maven Central
             from JBoss Nexus.
         -->
        <repository>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>
</project>
