<?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">
    <parent>
        <artifactId>quarkus-hibernate-reactive-parent</artifactId>
        <groupId>io.quarkus</groupId>
        <version>2.13.3.Final</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>quarkus-hibernate-reactive</artifactId>
    <name>Quarkus - Hibernate Reactive - Runtime</name>
    <description>A reactive API for Hibernate ORM, supporting non-blocking database drivers and a reactive style of interaction with the database.</description>
    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-hibernate-orm</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-agroal</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-narayana-jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-reactive-datasource</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.reactive</groupId>
            <artifactId>hibernate-reactive-core</artifactId>
            <exclusions>
                <!-- Make sure Quarkus can manage Mutiny via quarkus-mutiny -->
                <exclusion>
                    <groupId>io.smallrye.reactive</groupId>
                    <artifactId>mutiny</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-mutiny</artifactId>
        </dependency>
        <dependency>
            <groupId>org.graalvm.nativeimage</groupId>
            <artifactId>svm</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-extension-maven-plugin</artifactId>
                <configuration>
                    <capabilities>
                        <provides>io.quarkus.hibernate.reactive</provides>
                    </capabilities>
                    <excludedArtifacts>
                        <excludedArtifact>javax.persistence:javax.persistence-api</excludedArtifact>
                        <excludedArtifact>javax.persistence:persistence-api</excludedArtifact>
                    </excludedArtifacts>
                </configuration>
            </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>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jakarta-rewrite</id>
            <activation>
                <property>
                    <name>jakarta-rewrite</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.openrewrite.maven</groupId>
                        <artifactId>rewrite-maven-plugin</artifactId>
                        <configuration>
                            <activeRecipes>
                                <recipe>io.quarkus.hibernate-orm-narayana-switch</recipe>
                            </activeRecipes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
