<?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.quarkiverse.edb</groupId>
        <artifactId>quarkus-jdbc-edb-parent</artifactId>
        <version>1.3.0</version>
    </parent>
    <artifactId>quarkus-jdbc-edb</artifactId>
    <name>Quarkus JDBC EDB - Runtime</name>

    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arc</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-agroal</artifactId>
        </dependency>
        <dependency>
            <groupId>com.enterprisedb</groupId>
            <artifactId>edb-jdbc</artifactId>
            <version>${edb-jdbc.version}</version>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-kubernetes-service-binding</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- Provides com.oracle.svm.core.annotate.* for the GraalVM substitutions. -->
        <dependency>
            <groupId>org.graalvm.sdk</groupId>
            <artifactId>nativeimage</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit-internal</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-extension-maven-plugin</artifactId>
                <version>${quarkus.version}</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>extension-descriptor</goal>
                        </goals>
                        <configuration>
                            <deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
                            <parentFirstArtifacts>
                                <parentFirstArtifact>com.enterprisedb:edb-jdbc</parentFirstArtifact>
                            </parentFirstArtifacts>
                            <!--
                                Declared rather than derived. The derived value would be the same now
                                that quarkus.version is pinned to the LTS, but stating it keeps the
                                floor a decision rather than a side effect of whatever the build
                                happened to compile against.

                                Note this field alone does not make the extension discoverable on
                                older cores. The registry selects on built-with-quarkus-core, and
                                requires-quarkus-core can only narrow that. Building against the LTS
                                is what does the work; see the note on quarkus.version in the root
                                pom. Keep this value aligned with it.
                            -->
                            <requiresQuarkusCore>[3.40,)</requiresQuarkusCore>
                            <minimumJavaVersion>17</minimumJavaVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <configuration>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>io.quarkus</groupId>
                                    <artifactId>quarkus-extension-processor</artifactId>
                                </path>
                            </annotationProcessorPaths>
                            <annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
