<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/xsd/maven-4.0.0.xsd"
    child.project.url.inherit.append.path="false">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>39</version>
    </parent>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-tools-parent</artifactId>
    <name>Quarkus - Dev tools - Parent</name>
    <url>https://github.com/quarkusio/quarkus</url>
    <packaging>pom</packaging>
    <version>2.16.12.Final</version>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <distribution>repo</distribution>
            <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
        </license>
    </licenses>
    <scm child.scm.connection.inherit.append.path="false"
         child.scm.developerConnection.inherit.append.path="false"
         child.scm.url.inherit.append.path="false">
        <url>https://github.com/quarkusio/quarkus</url>
        <connection>scm:git:git@github.com:quarkusio/quarkus.git</connection>
        <developerConnection>scm:git:git@github.com:quarkusio/quarkus.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.release>11</maven.compiler.release>

        <!-- These properties are used by CreateProjectMojo to add the Maven Wrapper -->
        <proposed-maven-version>3.8.6</proposed-maven-version>
        <maven-wrapper.version>3.1.1</maven-wrapper.version>
        <gradle-wrapper.version>7.5.1</gradle-wrapper.version>

        <!-- These properties are needed in order for them to be resolvable by the generated projects -->
        <!-- Quarkus uses jboss-parent and it comes with 3.8.1-jboss-1, we don't want that in the templates -->
        <compiler-plugin.version>3.10.1</compiler-plugin.version>
        <kotlin.version>1.6.0</kotlin.version>
        <scala.version>2.12.13</scala.version>
        <scala-plugin.version>4.4.0</scala-plugin.version>

        <!-- Versions -->
        <assertj.version>3.23.1</assertj.version>
        <jackson-bom.version>2.14.2</jackson-bom.version>
        <jakarta.enterprise.cdi-api.version>2.0.2</jakarta.enterprise.cdi-api.version>
        <junit.version>5.9.2</junit.version>
        <commons-compress.version>1.22</commons-compress.version>
        <jboss-logging.version>3.5.0.Final</jboss-logging.version>
        <maven-core.version>3.8.6</maven-core.version>
        <mockito.version>4.11.0</mockito.version>
        <version.surefire.plugin>3.0.0-M7</version.surefire.plugin>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <quarkus.version>2.16.12.Final</quarkus.version>
        <maven-model-helper.version>21</maven-model-helper.version>
        <commons-io.version>2.11.0</commons-io.version>
        <smallrye-common.version>1.13.2</smallrye-common.version>
        <jandex.version>3.0.5</jandex.version>
    </properties>
    <modules>
        <module>registry-client</module>
        <module>message-writer</module>
        <module>devtools-testing</module>
        <module>codestarts</module>
        <module>base-codestarts</module>
        <module>devtools-common</module>
        <module>utilities</module>
    </modules>
    <dependencyManagement>
        <dependencies>
            <!-- Jackson dependencies, imported as a BOM -->
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson-bom.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>

            <!-- Mockito BOM -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-bom</artifactId>
                <version>${mockito.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>io.smallrye.common</groupId>
                <artifactId>smallrye-common-bom</artifactId>
                <version>${smallrye-common.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-base-codestarts</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-testing</artifactId>
                <scope>test</scope>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-registry-client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${commons-compress.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bootstrap-app-model</artifactId>
                <version>${quarkus.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bootstrap-maven-resolver</artifactId>
                <version>${quarkus.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus.qute</groupId>
                <artifactId>qute-core</artifactId>
                <version>${quarkus.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-message-writer</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-utilities</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-codestarts</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-devtools-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>maven-model-helper</artifactId>
                <version>${maven-model-helper.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${maven-core.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.enterprise</groupId>
                <artifactId>jakarta.enterprise.cdi-api</artifactId>
                <version>${jakarta.enterprise.cdi-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${maven-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-model</artifactId>
                <version>${maven-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${jboss-logging.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bootstrap-core</artifactId>
                <version>${quarkus.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bootstrap-core</artifactId>
                <type>test-jar</type>
                <scope>test</scope>
                <version>${quarkus.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-release</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>io.quarkus</groupId>
                        <artifactId>quarkus-enforcer-rules</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <!-- This dependency can be removed when MENFORCER-422 is available -->
                    <dependency>
                        <groupId>com.github.gastaldi</groupId>
                        <artifactId>enforcer-rules</artifactId>
                        <version>0.0.1</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <externalRules>
                                    <location>classpath:enforcer-rules/quarkus-require-java-version.xml</location>
                                </externalRules>
                                <externalRules>
                                    <location>classpath:enforcer-rules/quarkus-require-maven-version.xml</location>
                                </externalRules>
                                <externalRules>
                                    <location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
                                </externalRules>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${version.surefire.plugin}</version>
                <configuration>
                    <!-- combine.self suppresses warnings about java.io.tmpdir being defined twice -->
                    <systemPropertyVariables combine.self="override"/>
                    <!-- set tmpdir as early as possible because failsafe sets it too late for JDK16 -->
                    <argLine>-Djava.io.tmpdir="${project.build.directory}"</argLine>
                    <excludedEnvironmentVariables>MAVEN_OPTS</excludedEnvironmentVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.21.0</version>
                <dependencies>
                    <dependency>
                        <artifactId>quarkus-ide-config</artifactId>
                        <groupId>io.quarkus</groupId>
                        <version>${project.version}</version>
                    </dependency>
                  </dependencies>
                <configuration>
                    <!-- store outside of target to speed up formatting when mvn clean is used -->
                    <cachedir>.cache/formatter-maven-plugin-${formatter-maven-plugin.version}</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>1.8.0</version>
                <configuration>
                    <!-- store outside of target to speed up formatting when mvn clean is used -->
                    <cachedir>.cache/impsort-maven-plugin-${impsort-maven-plugin.version}</cachedir>
                    <groups>java.,javax.,jakarta.,org.,com.</groups>
                    <staticGroups>*</staticGroups>
                    <skip>${format.skip}</skip>
                    <removeUnused>true</removeUnused>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>quick-build</id>
            <activation>
                <property>
                    <name>quickly</name>
                </property>
            </activation>
            <properties>
                <skipTests>true</skipTests>
                <skipITs>true</skipITs>
                <enforcer.skip>true</enforcer.skip>
            </properties>
            <build>
                <defaultGoal>clean install</defaultGoal>
            </build>
        </profile>
        <profile>
            <id>quick-build-docs</id>
            <activation>
                <property>
                    <name>quicklyDocs</name>
                </property>
            </activation>
            <properties>
                <skipTests>true</skipTests>
                <skipITs>true</skipITs>
                <enforcer.skip>true</enforcer.skip>
            </properties>
            <build>
                <defaultGoal>clean install</defaultGoal>
            </build>
        </profile>
        <profile>
            <!-- separate "quickly" profile for CI to keep local "quickly" demands separated from CI demands -->
            <id>quick-build-ci</id>
            <activation>
                <property>
                    <name>quickly-ci</name>
                </property>
            </activation>
            <properties>
                <skipTests>true</skipTests>
                <skipITs>true</skipITs>
                <enforcer.skip>true</enforcer.skip>
                <format.skip>true</format.skip>
            </properties>
        </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>
                        <extensions>true</extensions>
                        <configuration>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <serverId>ossrh</serverId>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
                        </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>
                    <plugin>
                        <!-- ## IMPORTANT ## In your ~/.m2/settings.xml you
                            need to add and edit the following profile:
                            <profile>
                                <id>release</id>
                                <properties>
                                    <gpg.useagent>false</gpg.useagent>
                                    <gpg.executable>/usr/local/Cellar/gnupg@1.4/1.4.23_1/bin/gpg1</gpg.executable> <- use gpg1 on Mac OS X
                                    <gpg.homedir>~/.gnupg</gpg.homedir> <- Update to your own directory <gpg.passphrase>******</gpg.passphrase> <- Add your passphrase
                                </properties>
                            </profile>
                        -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</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>
                        <executions>
                            <execution>
                                <id>sort-imports</id>
                                <goals>
                                    <goal>sort</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <removeUnused>true</removeUnused>
                        </configuration>
                    </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>
        <profile>
            <id>jakarta-rewrite</id>
            <activation>
                <property>
                    <name>jakarta-rewrite</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.openrewrite.maven</groupId>
                            <artifactId>rewrite-maven-plugin</artifactId>
                            <version>4.21.0-SNAPSHOT</version>
                            <configuration>
                                <configLocation>${maven.multiModuleProjectDirectory}/jakarta/rewrite.yml</configLocation>
                                <activeStyles>
                                    <style>io.quarkus.style.maven</style>
                                </activeStyles>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <inherited>false</inherited>
                        <groupId>org.openrewrite.maven</groupId>
                        <artifactId>rewrite-maven-plugin</artifactId>
                        <configuration>
                            <activeRecipes>
                                <recipe>io.quarkus.maven.javax.managed</recipe>
                                <recipe>io.quarkus.maven.javax.versions</recipe>
                                <recipe>io.quarkus.jakarta-versions</recipe>
                            </activeRecipes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
