<?xml version="1.0"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    child.project.url.inherit.append.path="false">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-parent</artifactId>
        <version>3.32.4</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>
    <groupId>io.quarkus.qute</groupId>
    <artifactId>qute-parent</artifactId>
    <packaging>pom</packaging>
    <version>3.32.4</version>

    <name>Qute - Parent</name>
    <url>https://github.com/quarkusio/quarkus</url>

    <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>
        <version.junit>6.0.3</version.junit>
        <version.assertj>3.27.7</version.assertj>
        <version.jandex>3.5.3</version.jandex>
        <version.gizmo2>2.1.1</version.gizmo2>
        <version.jboss-logging>3.6.2.Final</version.jboss-logging>
        <version.smallrye-common>2.16.0</version.smallrye-common>
        <version.smallrye-mutiny>3.1.1</version.smallrye-mutiny>
        <version.lsp4j>0.24.0</version.lsp4j>
    </properties>

    <modules>
        <module>core</module>
        <module>generator</module>
        <module>debug</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.smallrye.common</groupId>
                <artifactId>smallrye-common-bom</artifactId>
                <version>${version.smallrye-common}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.smallrye.reactive</groupId>
                <artifactId>mutiny-bom</artifactId>
                <version>${version.smallrye-mutiny}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- JUnit dependencies, imported as a BOM -->
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${version.junit}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${version.assertj}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus.qute</groupId>
                <artifactId>qute-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus.qute</groupId>
                <artifactId>qute-generator</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus.qute</groupId>
                <artifactId>qute-debug</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.jboss-logging}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>jandex</artifactId>
                <version>${version.jandex}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>jandex-gizmo2</artifactId>
                <version>${version.jandex}</version>
            </dependency>
            <dependency>
                <groupId>io.quarkus.gizmo</groupId>
                <artifactId>gizmo2</artifactId>
                <version>${version.gizmo2}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.lsp4j</groupId>
                <artifactId>org.eclipse.lsp4j.debug</artifactId>
                <version>${version.lsp4j}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                </plugin>
                <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>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>enforce</id>
                            <phase>${maven-enforcer-plugin.phase}</phase>
                            <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>
                    <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>
            </plugins>
        </pluginManagement>
    </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>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>
    </profiles>

</project>
