<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.ebean</groupId>
    <artifactId>ebean-datasource-parent</artifactId>
    <version>10.1</version>
  </parent>

  <artifactId>ebean-datasource</artifactId>
  <name>ebean datasource</name>
  <description>ebean datasource implementation</description>

  <dependencies>

    <dependency>
      <groupId>io.ebean</groupId>
      <artifactId>ebean-datasource-api</artifactId>
      <version>10.1</version>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>junit</artifactId>
      <version>1.5</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.ebean</groupId>
      <artifactId>ebean-test-containers</artifactId>
      <version>7.8</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>42.7.2</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.yugabyte</groupId>
      <artifactId>jdbc-yugabytedb</artifactId>
      <version>42.3.5-yb-4</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.5.17</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk-platform-logging</artifactId>
      <version>2.0.17</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.avaje</groupId>
      <artifactId>avaje-slf4j-jpl</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>

    <!-- Override com.h2database version to get schema support -->
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>2.2.220</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.ibm.db2</groupId>
      <artifactId>jcc</artifactId>
      <version>11.5.9.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mariadb.jdbc</groupId>
      <artifactId>mariadb-java-client</artifactId>
      <version>3.5.3</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin> <!-- Multi-Release with 21 -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.3.0</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Multi-Release>true</Multi-Release>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>
        <executions>
          <!-- Compile for base version Java 11 -->
          <execution>
            <id>base</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>11</release>
              <compileSourceRoots>
                <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>
              </compileSourceRoots>
            </configuration>
          </execution>
          <!-- Compile for Java 21 -->
          <execution>
            <id>java21</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>21</release>
              <compileSourceRoots>
                <compileSourceRoot>${project.basedir}/src/main/java21</compileSourceRoot>
              </compileSourceRoots>
              <outputDirectory>${project.build.outputDirectory}/META-INF/versions/21</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>
