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

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>51</version>
    </parent>

    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-fs-util</artifactId>
    <version>1.3.0</version>
    <packaging>jar</packaging>
    <name>Quarkus - FS Util</name>

    <description>Quarkus Filesystem Utils</description>
    <url>https://quarkus.io/</url>
    <developers>
        <developer>
            <id>quarkus</id>
            <name>Quarkus Community</name>
            <organization>Quarkus</organization>
            <organizationUrl>https://quarkus.io</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/quarkusio/quarkus-fs-util</url>
        <connection>scm:git:git@github.com:quarkusio/quarkus-fs-util.git</connection>
        <developerConnection>scm:git:git@github.com:quarkusio/quarkus-fs-util.git</developerConnection>
        <tag>1.3.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/quarkusio/quarkusfs-util/issues/</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.release>17</maven.compiler.release>
        <maven.compiler.parameters>true</maven.compiler.parameters>

        <junit.jupiter.version>6.0.2</junit.jupiter.version>
        <quarkus.version>3.15.1</quarkus.version>

        <formatter-maven-plugin.version>2.29.0</formatter-maven-plugin.version>
        <impsort-maven-plugin.version>1.12.0</impsort-maven-plugin.version>
        <surefire-plugin.version>3.5.4</surefire-plugin.version>

        <!-- maven-release-plugin -->
        <releaseProfiles>release</releaseProfiles>
        <signTag>false</signTag><!-- we don't sign tags as we don't want GPG secrets available in repository -->
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${formatter-maven-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <artifactId>quarkus-ide-config</artifactId>
                            <groupId>io.quarkus</groupId>
                            <version>${quarkus.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <!-- store outside of target to speed up formatting when mvn clean is used -->
                        <cachedir>.cache</cachedir>
                        <configFile>eclipse-format.xml</configFile>
                        <lineEnding>LF</lineEnding>
                        <skip>${format.skip}</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>impsort-maven-plugin</artifactId>
                    <version>${impsort-maven-plugin.version}</version>
                    <configuration>
                        <!-- store outside of target to speed up formatting when mvn clean is used -->
                        <cachedir>.cache</cachedir>
                        <removeUnused>true</removeUnused>
                        <skip>${format.skip}</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire-plugin.version}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <maven.home>${maven.home}</maven.home>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <tagNameFormat>@{project.version}</tagNameFormat>

                            <pushChanges>false</pushChanges>
                            <localCheckout>true</localCheckout>
                            <remoteTagging>false</remoteTagging>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>format</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>!no-format</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.revelc.code.formatter</groupId>
                        <artifactId>formatter-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code</groupId>
                        <artifactId>impsort-maven-plugin</artifactId>
                        <configuration>
                            <removeUnused>true</removeUnused>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sort-imports</id>
                                <goals>
                                    <goal>sort</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>validate</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>no-format</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.revelc.code.formatter</groupId>
                        <artifactId>formatter-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>validate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code</groupId>
                        <artifactId>impsort-maven-plugin</artifactId>
                        <configuration>
                            <removeUnused>true</removeUnused>
                        </configuration>
                        <executions>
                            <execution>
                                <id>check-imports</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


</project>
