<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2019, 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.cdi</groupId>
        <artifactId>helidon-integrations-cdi-project</artifactId>
        <version>4.3.3</version>
    </parent>
    <artifactId>helidon-integrations-cdi-eclipselink</artifactId>
    <name>Helidon CDI Integrations Eclipselink</name>

    <dependencies>

        <dependency>
            <groupId>io.helidon.common.features</groupId>
            <artifactId>helidon-common-features-api</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- Test-scoped dependencies. -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.microprofile.cdi</groupId>
            <artifactId>helidon-microprofile-cdi</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>helidon-integrations-cdi-datasource-hikaricp</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.microprofile.config</groupId>
            <artifactId>helidon-microprofile-config</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
        
        <!-- Runtime-scoped dependencies. -->
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>jandex</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Provided-scoped dependencies. -->
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.transaction</groupId>
            <artifactId>jakarta.transaction-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Compile-scoped dependencies. -->
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.integrations.jdbc</groupId>
            <artifactId>helidon-integrations-jdbc</artifactId>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-Xlint:-requires-automatic</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>io.helidon.codegen</groupId>
                            <artifactId>helidon-codegen-apt</artifactId>
                            <version>${helidon.version}</version>
                        </path>
                        <path>
                            <groupId>io.helidon.common.features</groupId>
                            <artifactId>helidon-common-features-codegen</artifactId>
                            <version>${helidon.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>io.helidon.codegen</groupId>
                        <artifactId>helidon-codegen-apt</artifactId>
                        <version>${helidon.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>io.helidon.common.features</groupId>
                        <artifactId>helidon-common-features-codegen</artifactId>
                        <version>${helidon.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>io.smallrye</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <systemPropertyVariables>
                  <javax.sql.DataSource.test.dataSourceClassName>org.h2.jdbcx.JdbcDataSource</javax.sql.DataSource.test.dataSourceClassName>
                  <javax.sql.DataSource.test.dataSource.url>jdbc:h2:mem:test</javax.sql.DataSource.test.dataSource.url>
                  <javax.sql.DataSource.test.dataSource.user>jdbc:h2:mem:test</javax.sql.DataSource.test.dataSource.user>
                </systemPropertyVariables>
              </configuration>
            </plugin>
        </plugins>
    </build>
</project>
