<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2011-2026 Contributors to the Eclipse Foundation
  ~
  ~ This program and the accompanying materials are made available under the
  ~ terms of the Eclipse Public License 2.0 which is available at
  ~ http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
  ~ which is available at https://www.apache.org/licenses/LICENSE-2.0.
  ~
  ~ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
  -->
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-sql-client-parent</artifactId>
    <version>5.1.3</version>
  </parent>

  <artifactId>vertx-db2-client</artifactId>

  <name>Vertx DB2 Client</name>
  <url>https://github.com/eclipse-vertx/vertx-sql-client</url>
  <description>The Reactive DB2 client</description>

  <properties>
    <!-- Set to a value for testing with a specific database version -->
    <db2-container.version/>
    <vertx.asciidoc.sources.dir>${project.basedir}/src/main/asciidoc/*.adoc,${project.basedir}/../vertx-sql-client/src/main/asciidoc/*.adoc</vertx.asciidoc.sources.dir>
    <vertx.surefire.useModulePath>false</vertx.surefire.useModulePath>
    <log4j.version>2.25.4</log4j.version>
  </properties>

  <dependencies>

    <!-- Vert.x dependencies -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-sql-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-sql-client-codec</artifactId>
    </dependency>

    <!-- Testing purposes -->
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>${testcontainers.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- SLF4J API for test code and Testcontainers -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.9</version>
      <scope>test</scope>
    </dependency>
    <!-- Log4j 2 API -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.20.0</version>
      <scope>test</scope>
    </dependency>
    <!-- Log4j 2 Core -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- Log4j 2 SLF4J Binding -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-sql-client</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>-Xmx1024M</argLine>
          <failIfNoTests>true</failIfNoTests>
          <trimStackTrace>false</trimStackTrace>
          <systemPropertyVariables>
            <target.dir>${project.build.directory}</target.dir>
            <db2-container.version>${db2-container.version}</db2-container.version>
            <!-- Copy of java.security that allows TLS 1.1 as the DB2 container will only accept this version
                 (https://bugs.openjdk.java.net/browse/JDK-8258598) -->
            <java.security.properties>${project.basedir}/src/test/java.security</java.security.properties>
          </systemPropertyVariables>
        </configuration>
      </plugin>
<!--
      <plugin>
        <groupId>org.bsc.maven</groupId>
        <artifactId>maven-processor-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-sources</id>
            <configuration>
              <optionMap>
                <docgen.source>${project.basedir}/../vertx-sql-client/src/main/asciidoc/*.adoc,${asciidoc.dir}/*.adoc</docgen.source>
              </optionMap>
            </configuration>
          </execution>
        </executions>
      </plugin>
-->
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>DB2-12.1</id>
      <properties>
        <db2-container.version>12.1.4.0</db2-container.version>
      </properties>
    </profile>
  </profiles>

</project>
