<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-core-parent</artifactId>
        <version>3.6.2</version>
    </parent>

    <artifactId>quarkus-core-deployment</artifactId>
    <name>Quarkus - Core - Deployment</name>

    <dependencies>
        <dependency>
            <groupId>org.aesh</groupId>
            <artifactId>readline</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aesh</groupId>
            <artifactId>aesh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus.gizmo</groupId>
            <artifactId>gizmo</artifactId>
        </dependency>
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>jandex</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-development-mode-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-class-change-agent</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bootstrap-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.sisu</groupId>
                    <artifactId>org.eclipse.sisu.inject</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>listenablefuture</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bootstrap-maven-resolver</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bootstrap-gradle-resolver</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-devtools-utilities</artifactId>
        </dependency>
        <dependency>
            <!-- We don't want the annotation processor to run
             as it leaves junk files in the project-->
            <groupId>org.eclipse.sisu</groupId>
            <artifactId>org.eclipse.sisu.inject</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus.gizmo</groupId>
            <artifactId>gizmo</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-builder</artifactId>
        </dependency>
        <dependency>
            <groupId>org.graalvm.sdk</groupId>
            <artifactId>graal-sdk</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bootstrap-core</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bom-quarkus-platform-properties</artifactId>
            <type>pom</type>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <!-- Give tests a hint to not use containers, by default -->
                        <avoid-containers>true</avoid-containers>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-test-deps-junit-scope</id>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>enforce-quarkus-core-deployment</id>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- findbugs is not required at runtime -->
                                        <exclude>com.google.code.findbugs:jsr305</exclude>
                                        <!-- com.google.guava:listenablefuture is empty and the ListenableFuture class is available in Guava -->
                                        <exclude>com.google.guava:listenablefuture</exclude>
                                        <!-- let's avoid having commons-io crawling into quarkus-core -->
                                        <exclude>commons-io:commons-io</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>io.quarkus</groupId>
                            <artifactId>quarkus-extension-processor</artifactId>
                            <version>${project.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
                <executions>
                    <execution>
                        <id>verify-forbidden-apis</id>
                        <configuration>
                            <signaturesFiles>
                                <signaturesFile>./banned-signatures.txt</signaturesFile>
                                <signaturesFile>${maven.multiModuleProjectDirectory}/.forbiddenapis/banned-signatures-common.txt</signaturesFile>
                            </signaturesFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.gradle</groupId>
                    <artifactId>gradle-enterprise-maven-extension</artifactId>
                    <configuration>
                        <gradleEnterprise>
                            <!--
                            For now, do not store the output of the maven-compiler-plugin as we generate the config doc.
                            Ideally, we would register them as additional output but their organization is too messy for now.
                            -->
                            <plugins combine.children="append">
                                <plugin>
                                    <artifactId>maven-compiler-plugin</artifactId>
                                    <outputs>
                                        <notCacheableBecause>the extension config doc generation tool shares data across all extensions</notCacheableBecause>
                                    </outputs>
                                </plugin>
                            </plugins>
                        </gradleEnterprise>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>test-native-container-build</id>
            <activation>
                <property>
                    <name>start-containers</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <!-- Enable the container-based tests -->
                                <avoid-containers>false</avoid-containers>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
