<?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 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.arc</groupId>
    <artifactId>arc-parent</artifactId>
    <name>ArC - Parent pom</name>
    <url>https://github.com/quarkusio/quarkus</url>
    <packaging>pom</packaging>
    <version>2.13.1.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>
        <!-- Versions -->
        <version.cdi>2.0.2</version.cdi>
        <version.jta>1.3.3</version.jta>
        <version.jandex>2.4.3.Final</version.jandex>
        <version.junit5>5.9.1</version.junit5>
        <version.maven>3.8.6</version.maven>
        <version.assertj>3.23.1</version.assertj>
        <version.jboss-logging>3.5.0.Final</version.jboss-logging>
        <version.jakarta-annotation>1.3.5</version.jakarta-annotation>
        <version.gizmo>1.1.0.Final</version.gizmo>
        <version.jpa>2.2.3</version.jpa>
        <version.mutiny>1.6.0</version.mutiny>

        <version.surefire.plugin>3.0.0-M7</version.surefire.plugin>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
    </properties>

    <modules>
        <module>runtime</module>
        <module>processor</module>
        <module>tests</module>
    </modules>

    <dependencyManagement>

        <dependencies>

            <dependency>
                <groupId>io.quarkus.arc</groupId>
                <artifactId>arc</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.quarkus.arc</groupId>
                <artifactId>arc-processor</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.enterprise</groupId>
                <artifactId>jakarta.enterprise.cdi-api</artifactId>
                <version>${version.cdi}</version>
            </dependency>

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

            <dependency>
                <groupId>io.quarkus.gizmo</groupId>
                <artifactId>gizmo</artifactId>
                <version>${version.gizmo}</version>
            </dependency>

            <dependency>
                <groupId>io.smallrye.reactive</groupId>
                <artifactId>mutiny</artifactId>
                <version>${version.mutiny}</version>
            </dependency>

            <!-- JUnit 5 dependencies, imported as a BOM -->
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.junit5}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>


            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${version.maven}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>${version.maven}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${version.maven}</version>
                <scope>provided</scope>
            </dependency>

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

            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${version.jakarta-annotation}</version>
                <!-- scope>provided</scope -->
            </dependency>

            <dependency>
                <groupId>jakarta.transaction</groupId>
                <artifactId>jakarta.transaction-api</artifactId>
                <version>${version.jta}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.persistence</groupId>
                <artifactId>jakarta.persistence-api</artifactId>
                <version>${version.jpa}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.assertj}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>io.quarkus.gizmo</groupId>
                <artifactId>gizmo</artifactId>
                <version>${version.gizmo}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

        </dependencies>

    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <quiet>true</quiet>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <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>
                                    <dependencyConvergence/>
                                    <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.20.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.7.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>
                        <removeUnused>true</removeUnused>
                        <skip>${format.skip}</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

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

    <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>false</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.jakarta-versions</recipe>
                            </activeRecipes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
