<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2023, 2025 Oracle and/or its affiliates.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<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.helidon.integrations.oci</groupId>
        <artifactId>helidon-integrations-oci-project</artifactId>
        <version>4.3.2</version>
    </parent>
    <artifactId>helidon-integrations-oci-secrets-config-source</artifactId>
    <name>Helidon Integrations OCI Secrets Config Source</name>

    <description>
        OCI Secrets Retrieval API ConfigSourceProvider Implementation
    </description>

    <properties>
        <compartment-ocid/>
        <java.util.logging.config.file>src/test/java/logging.properties</java.util.logging.config.file>
        <lazy>false</lazy>
        <vault-ocid/>
    </properties>

    <dependencies>

        <!-- Compile-scoped dependencies. -->

        <dependency>
            <groupId>io.helidon.common</groupId>
            <artifactId>helidon-common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.config</groupId>
            <artifactId>helidon-config</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.service</groupId>
            <artifactId>helidon-service-registry</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.integrations.oci</groupId>
            <artifactId>helidon-integrations-oci</artifactId>
        </dependency>
        <dependency>
            <groupId>com.oracle.oci.sdk</groupId>
            <artifactId>oci-java-sdk-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.oracle.oci.sdk</groupId>
            <artifactId>oci-java-sdk-secrets</artifactId>
        </dependency>
        <dependency>
            <groupId>com.oracle.oci.sdk</groupId>
            <artifactId>oci-java-sdk-vault</artifactId>
        </dependency>

        <!-- Runtime-scoped dependencies. -->

        <dependency>
            <groupId>com.oracle.oci.sdk</groupId>
            <artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
            <scope>runtime</scope>
            <exclusions>
                <!-- For dependency convergence. Defer to versions from jersey-apache-connector -->
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- For dependency convergence. To make sure we use Jersey version of org.apache.httpcomponents:httpclient and httpcore -->
        <dependency>
            <groupId>org.glassfish.jersey.connectors</groupId>
            <artifactId>jersey-apache-connector</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Test-scoped dependencies. -->
        <dependency>
            <groupId>io.helidon.config</groupId>
            <artifactId>helidon-config-yaml-mp</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>meta-config.yaml</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <compartment-ocid>${compartment-ocid}</compartment-ocid>
                        <java.util.logging.config.file>${java.util.logging.config.file}</java.util.logging.config.file>
                        <vault-ocid>${vault-ocid}</vault-ocid>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
