<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~
  ~ Copyright 2023 Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>org.jboss.logging</groupId>
        <artifactId>logging-parent</artifactId>
        <version>1.0.3.Final</version>
    </parent>

    <groupId>org.jboss.logging</groupId>
    <artifactId>jboss-logging-tools-parent</artifactId>
    <version>3.0.4.Final</version>
    <packaging>pom</packaging>

    <name>JBoss Logging Tools Parent</name>

    <developers>
        <developer>
            <name>James R. Perkins</name>
            <email>jperkins@redhat.com</email>
        </developer>
        <developer>
            <name>Kevin Pollet</name>
            <email>kevin.pollet@serli.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:jboss-logging/jboss-logging-tools.git</connection>
        <developerConnection>scm:git:git@github.com:jboss-logging/jboss-logging-tools.git</developerConnection>
        <url>http://github.com/jboss-logging/jboss-logging-tools</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.org.jboss.jdeparser>2.0.3.Final</version.org.jboss.jdeparser>
        <version.org.jboss.logging>3.6.1.Final</version.org.jboss.logging>
        <version.org.jboss.logmanager>3.1.2.Final</version.org.jboss.logmanager>
        <verion.org.jboss.forge.roaster>2.22.3.Final</verion.org.jboss.forge.roaster>
        <version.org.junit>5.12.0</version.org.junit>
    </properties>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-annotations</artifactId>
                <version>${project.version}</version>
            </dependency>

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

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

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

            <dependency>
                <groupId>org.jboss.forge.roaster</groupId>
                <artifactId>roaster-api</artifactId>
                <version>${verion.org.jboss.forge.roaster}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.forge.roaster</groupId>
                <artifactId>roaster-jdt</artifactId>
                <version>${verion.org.jboss.forge.roaster}</version>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.org.junit}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <show>public</show>
                        <header>JBoss Logging Tools, ${project.version}</header>
                        <footer>JBoss Logging Tools, ${project.version}</footer>
                        <doctitle>JBoss Logging Tools, ${project.version}</doctitle>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <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>

    <modules>
        <module>annotations</module>
        <module>processor</module>
        <module>docs</module>
    </modules>

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